Heartbeat 安静确认防泄漏:确保 HEARTBEAT_OK 不被误发到外部频道
问题/场景:心跳轮询应仅做内部 ACK,但 `HEARTBEAT_OK` 偶发外发造成噪音。前置条件:已启用 heartbeat。实施步骤:检查 heartbeat 模板→设置静默策略→做回归压测。关键配置:`showOk:false` + 明确无任务分支。验证:无事项时通道不再出现 HEARTBEAT_OK。风险:规则写错会吞掉真实告警。
GITHUBDiscovered 2026-02-15Author emmyon
Prerequisites
- Heartbeat polling is active and channel delivery behavior is observable in logs/history.
- You can edit HEARTBEAT.md and gateway heartbeat settings safely.
Steps
- Review heartbeat prompt text to ensure the no-work branch returns only HEARTBEAT_OK (no extra prose).
- Keep HEARTBEAT.md empty/comment-only when no periodic task is needed, reducing accidental outbound content.
- Run multiple heartbeat cycles and inspect channel history for any leaked HEARTBEAT_OK tokens.
- If leakage persists, pin version/patch and track upstream fix issue until merged.
Commands
openclaw statusopenclaw gateway statusVerify
Across several heartbeat runs with no pending tasks, no HEARTBEAT_OK text appears in user-facing channels.
Caveats
- If your workflow relies on visible heartbeat confirmations, removing channel ACKs may reduce operator confidence.
- Final behavior depends on deployed gateway build and channel plugin implementation(需验证).
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗