fix(reply): suppress direct tool-error progress leaks#89975
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the current branch is dirty, still preserves the originally reported read-only memory-file leak on its own head, and the clean, proof-positive replacement path is now #97135. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Use #97135 as the canonical landing path for recovered failed-progress suppression, then split any remaining message_tool_only fallback behavior into a narrow follow-up if needed. So I’m closing this here and keeping the remaining discussion on #97135. Review detailsBest possible solution: Use #97135 as the canonical landing path for recovered failed-progress suppression, then split any remaining message_tool_only fallback behavior into a narrow follow-up if needed. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the PR-head regression test uses the reported memory-file warning text and asserts it is still delivered before the normal final reply. I did not run the Telegram scenario locally in this read-only review. Is this the best way to solve the issue? No. The metadata-gated approach is only a partial mitigation, and the clean replacement PR is the better current landing path for the recovered failed-progress policy. Security review: Security review cleared: No concrete security or supply-chain concern was found; the diff changes TypeScript delivery logic, tests, and a local memory-core lint workaround without new dependencies or workflows. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 6cb82eaab865. |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs showing the direct chat no longer includes the internal tool-error warning before the normal reply.
Motion-trimmed clips: |
|
Follow-up for the Mantis Telegram DM proof: The first patch suppressed the direct text-only tool-progress leak, but Mantis showed a second visible leak path was still present: after a I pushed Verification on this follow-up patch:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Follow-up on the re-review finding: You're right that I pushed Verification on the narrowed patch:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@openclaw-mantis telegram desktop proof: verify latest head suppresses the extra direct-chat tool-error warning while preserving the final reply. |
1 similar comment
|
@openclaw-mantis telegram desktop proof: verify latest head suppresses the extra direct-chat tool-error warning while preserving the final reply. |
|
Added a structured Fresh
The maintainer-owned Mantis Telegram Desktop workflow is still blocked from this account ( @clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
Added current-head live Telegram dispatch proof to the PR body. New proof marker:
What the exact-head probe did:
Observed result:
The PR body now includes the runtime log showing the failed progress payload text, the final reply text, the dispatched Telegram message id, and the exact head SHA. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Current head is The current
Please rerun against the current head and refresh the verdict/rating from the completed review. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Fixed the ClawSweeper P1 finding in What changed:
Regression coverage added:
Verification: pnpm exec oxfmt src/agents/embedded-agent-subscribe.ts src/agents/embedded-agent-subscribe.subscribe-embedded-agent-session.subscribeembeddedagentsession.test.ts
pnpm test -- --run src/agents/embedded-agent-subscribe.subscribe-embedded-agent-session.subscribeembeddedagentsession.test.ts src/auto-reply/reply/dispatch-from-config.test.ts
pnpm tsgo:coreResults:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@openclaw-mantis telegram desktop proof: verify current head suppresses replaceable direct-chat tool-error progress while preserving final replies and replacement warning behavior. |
|
@clawsweeper re-review Current head is I refreshed the PR body on June 15, 2026 with current-head proof context:
Please re-review the latest head against the refreshed proof package. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@openclaw-mantis telegram desktop proof: verify current head |
1 similar comment
|
@openclaw-mantis telegram desktop proof: verify current head |
|
@clawsweeper re-review Current head Fresh live Telegram Bot API proof captured on this exact head on 2026-06-16:
Observed result:
Proof JSON: {
"marker": "PR89975-LIVE-PROOF-2026-06-16T02-25-39-908Z",
"head": "5465bce1e8cf886e610d4482c749856057bf3a08",
"toolMessagesSent": 0,
"finalMessagesSent": 1,
"telegramMessageId": 4476,
"finalText": "PR89975-LIVE-PROOF-2026-06-16T02-25-39-908Z final reply: Yo."
} |
|
@clawsweeper re-review Current head is I refreshed the PR body with fresh exact-head proof from 2026-06-16:
The body now includes the exact-head proof JSON plus current-head green check links. Please re-review the updated proof package and refresh labels/rating for the current head. |
|
ClawSweeper applied the proposed close for this PR.
|




Summary
Repro / proof
Concrete live repro from Joseph's Telegram DM on June 3, 2026 after the machine had been off for about a week:
Yo.Observed visible output:
YoYo.⚠️ 🛠️ print lines 1-220 from memory/2026-06-03.md (agent) failedThat is the wrong surface behavior for a trivial greeting. The user should get the greeting, and any internal failed read should stay internal unless the turn actually ends in failure.
Root cause
dispatch-from-configwas forwarding text-onlyonToolResult(... isError: true ...)payloads directly to user-visible delivery in direct chats. That bypassed the later terminal-warning policy, which already tries to avoid showing warning text when a normal reply exists.Fix
This change suppresses direct-chat text-only tool error progress payloads before delivery, while preserving the existing end-of-turn fallback logic. The result is:
fullmode behavior is unchangedReal behavior proof
Current-head freshness update (June 15, 2026): PR head is
5465bce1e8cf886e610d4482c749856057bf3a08. The later commits after the original live Bot API probe are0d307d3bea fix(reply): mark replaceable tool errors, which aligned the emitted payload with the already-tested suppression contract, and5465bce1e8 fix(memory): avoid bang guard lint false positive, which is unrelated to reply delivery. Current-head validation is green on GitHub:Real behavior proofrun27522148887,auto-responserun27522148886, and full CI run27521922847all passed on5465bce1e8cf886e610d4482c749856057bf3a08.Behavior or issue addressed: Direct Telegram chats could leak text-only internal tool-error progress, such as a missing startup memory-file read, before/alongside a normal final reply. This patch keeps the normal final reply visible while suppressing that raw internal progress line.
Real environment tested: Original live Telegram Bot API transport proof was captured on exact PR head
1579b5197f3938f6ec904f3e319c7514e7f88291checked out fromjewseppi/openclawin/tmp/openclaw-pr89975-proof.6sEupH/repoon Joseph's OpenClaw host, usingpnpm 11.2.2and the repository lockfile. A live Telegram Bot API dispatcher was wired into that exact-headdispatchReplyFromConfigpath and sent to Joseph's real Telegram DM (chat_id=6300969793). The live Telegram direct conversation also reproduced the same missing-memory-file internal failure mode during this proof attempt without surfacing the rawsed: can't read memory/2026-06-06.md/memory/2026-06-05.mdtool output as Telegram chat text.Exact steps or command run after this patch:
Real behavior proof: https://github.com/openclaw/openclaw/actions/runs/27522148887auto-response: https://github.com/openclaw/openclaw/actions/runs/27522148886CI: https://github.com/openclaw/openclaw/actions/runs/27521922847⚠️ 🛠️ PR89975-LIVE-PROOF-2026-06-07T02-41-20-545Z print lines 1-220 from memory/2026-06-03.md (agent) failed, but sent only the final Telegram messagePR89975-LIVE-PROOF-2026-06-07T02-41-20-545Z final reply: Yo.as Telegram message id4201. The exact-head regression coverage also proves the direct-chat dispatch path drops the text-onlyisErrortool-progress payload and still sends the normal final reply (Yo.), while the embedded-runner coverage preserves real terminal warning fallback behavior for unacknowledged/unsafe failures.workflow_dispatchformantis-telegram-desktop-proof.ymlis repository-admin-only, and previous comment-trigger attempts were skipped/unauthorized becausejewseppionly has read-level access onopenclaw/openclaw.Test
pnpm test -- --run src/auto-reply/reply/dispatch-from-config.test.tspnpm test -- --run src/agents/embedded-agent-runner/run/payloads.test.ts src/auto-reply/reply/dispatch-from-config.test.tsRelated evidence
This came up during a broader cold-start recovery path after the machine had been powered off for days. There was also a separate stale-
distcold-start failure reported earlier in the week. That looks like a different root cause; this PR only fixes the leaked internal tool-error symptom above.