BlueBubbles 历史回填修复:DM 首次接入按 dmHistoryLimit 补全上下文
问题/场景:BlueBubbles 直聊(DM)历史未按预期回填,导致会话上下文断裂。前置条件:已启用 BlueBubbles 通道并依赖历史消息理解。实施步骤:升级到包含 PR #20302 的版本,确认 dmHistoryLimit/historyLimit 分流生效,首次消息触发 API 回填后仅使用内存滚动历史。关键命令:`openclaw gateway restart`、`openclaw gateway status`、查看通道日志。验证:DM 首次进入即可看到近 N 条历史,后续消息不再重复全量回填。风险与边界:历史范围设置过大可能增加启动/首条延迟。来源:PR #20302(Fixes #20296)。
GITHUBDiscovered 2026-02-22Author Ryan-Haines
Prerequisites
- BlueBubbles integration is already configured and receiving inbound messages.
- You can inspect runtime logs to confirm history backfill behavior.
Steps
- Upgrade OpenClaw to a version including PR #20302 (Fixes #20296).
- Set/verify DM-specific `dmHistoryLimit` and group `historyLimit` according to chat size.
- Restart gateway and send the first DM message to trigger one-time API backfill.
- Observe later DM messages: they should use rolling in-memory history, not repeated full backfills.
Commands
openclaw gateway restartopenclaw gateway status# check BlueBubbles monitor-processing logs for first-message backfill onlyVerify
First DM after restart includes expected historical context; subsequent DMs avoid repeated API-history fetch spikes.
Caveats
- Large history limits can increase memory usage and first-message latency on constrained hosts.
- Exact log field names may vary by plugin version; verify against your deployed build(需验证).
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗