Repository navigation
Conversation
When visibleReplies is set to message_tool, the heartbeat runner was delivering the raw agent reply text to the channel even when the heartbeat response tool was not called. This leaked private replies. Suppress the delivery unless the reply is an error/failure notice that explicitly opts into source-suppression delivery. Closes openclaw#94053
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. This PR should close in favor of the cleaner same-root-cause candidate because it suppresses every no-tool heartbeat reply whenever the heartbeat tool is forced, while the supported contract only makes missed-tool final text private after an explicit Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this branch and review or land #94088 as the canonical fix for the linked heartbeat privacy bug. So I’m closing this here and keeping the remaining discussion on #94088. Review detailsBest possible solution: Close this branch and review or land #94088 as the canonical fix for the linked heartbeat privacy bug. Do we have a high-confidence way to reproduce the issue? Yes. The linked report and current source show that Is this the best way to solve the issue? No. The runner-level guard is the right area, but this branch scopes it too broadly; the safer solution is the canonical candidate that requires explicit message-tool visibility and preserves Codex default fallback behavior. Security review: Security review cleared: No dependency, workflow, script, credential, lockfile, or supply-chain changes were found; the remaining privacy and delivery concerns are functional merge risks. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against aad0559de0e2. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
messages.visibleRepliesis set tomessage_tool, the heartbeat runner was delivering the raw agent reply text to the channel even when the heartbeat response tool was not called withnotify: true.message_tool_onlyprivacy mode.Verification
node scripts/run-vitest.mjs run src/infra/heartbeat-runner.tool-response.test.ts→ 13/13 passedImpact Assessment
src/infra/heartbeat-runner.ts— adds a guard before theshouldSkipMaincheckvisibleReplies: "message_tool"is configured; error notices are still delivered viadeliverDespiteSourceReplySuppressiongetReplyPayloadMetadatato allow error notices through; regular replies without the heartbeat tool invocation are suppressedReal behavior proof
Behavior addressed: Heartbeat runner leaked private replies to Telegram in
message_tool_onlymode. After the fix, raw replies are suppressed unless the heartbeat response tool is called or the reply is an error notice.Environment tested: Node 22.x on Linux, vitest test suite.
Steps run after the patch: Ran heartbeat tool response tests including the Codex failure notice scenario.
(cd /home/.../openclaw && node scripts/run-vitest.mjs run src/infra/heartbeat-runner.tool-response.test.ts)Evidence after fix:
Observed result: All 13 tests pass, including the Codex runtime failure notice delivery test which verifies error messages are still delivered in message_tool mode.
Not tested: Live Telegram bot with
visibleReplies: "message_tool"configuration was not exercised.Closes #94053