-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Current-session message-tool replies can be replaced by private bookkeeping finals #91330
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
In automatic channel delivery mode, a successful
message(action="send")call back to the current source conversation can be delivered to the user without being recorded as a delivered source reply. If the model then emits a private bookkeeping final, OpenClaw can select that bookkeeping text as the visible final response instead of treating the message-tool send as the user-facing answer.This is a message-delivery/final-selection bug, not a QQBot setup bug and not a gateway-restart recovery request.
Real environment observed
2026.6.5-beta.2message(action="send")to reply to the same source conversation during the turnUser-visible symptom
The agent completed the useful diagnostic work and sent the substantive answer through the message tool to the current Telegram conversation. The same run then ended with private bookkeeping text equivalent to:
That bookkeeping text became the apparent final surface for the turn, making the chat look like the useful conclusion was missing or replaced even though the message-tool reply had already been sent.
Source-level repro on current main
The current source-reply extraction path only records message-tool source replies when the tool result carries source-reply metadata such as
sourceReplySink: "internal-ui":However, a normal successful current-source message-tool send can return an ordinary send payload such as:
{ "ok": true, "messageId": "<redacted>" }or a core send wrapper whose positive delivery evidence is nested under
payload.result.messageId, withoutsourceReplySink. Downstream final-payload selection therefore lacks evidence that the current source reply was already delivered. A later assistant bookkeeping final remains eligible for channel-visible delivery.The problematic shape is:
message(action="send")succeeds;Expected behavior
For a successful
message(action="send")to the current source conversation:messageId/message_idor explicit sent/delivered status, and no failed/error status).Actual behavior
Current-source message-tool sends can be treated like ordinary external sends. Without source-reply metadata, the embedded runner cannot reliably distinguish an already-delivered source reply from an unrelated message-tool send, so later private final text can still be selected as the visible reply.
Scope / non-goals
Proposed fix
#91333 proposes the narrow fix for this issue.