fix #96840: [Bug]: Targetless message.send fails with 'Action send requires a target' in WebChat despite docs stating source-reply sink should handle it#97167
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 8:06 PM ET / 00:06 UTC. Summary PR surface: Source +12, Tests +164. Total +176 across 6 files. Reproducibility: yes. Source inspection shows current main leaves implicit internal WebChat message tools without message_tool_only, the sink requires that mode, and target validation throws once the sink is skipped. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one narrow fix after maintainer message-delivery review confirms the source-reply plus automatic-final behavior, then close the linked issue and closed duplicate candidates as resolved by the selected branch. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main leaves implicit internal WebChat message tools without message_tool_only, the sink requires that mode, and target validation throws once the sink is skipped. Is this the best way to solve the issue? Yes. After the follow-up commit, the fix is at the message-tool construction and payload projection boundary rather than making all WebChat runs message-tool-only; that preserves ordinary automatic finals while repairing targetless tool sends. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5e572dcf781a. Label changesLabel justifications:
Evidence reviewedPR surface: Source +12, Tests +164. Total +176 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Maintainer proof complete for final exact head The final patch routes targetless WebChat Proof:
No unresolved review threads or known proof gaps remain. Ready to land. |
f3a0dab to
0eb5874
Compare
|
Merged via squash.
|
… send requires a target' in WebChat despite docs stating source-reply sink should handle it (openclaw#97167) * fix(message): route WebChat sends to source sink * fix(webchat): preserve message tool source replies --------- Co-authored-by: Peter Steinberger <[email protected]>
… send requires a target' in WebChat despite docs stating source-reply sink should handle it (openclaw#97167) * fix(message): route WebChat sends to source sink * fix(webchat): preserve message tool source replies --------- Co-authored-by: Peter Steinberger <[email protected]>
… send requires a target' in WebChat despite docs stating source-reply sink should handle it (openclaw#97167) * fix(message): route WebChat sends to source sink * fix(webchat): preserve message tool source replies --------- Co-authored-by: Peter Steinberger <[email protected]>
… send requires a target' in WebChat despite docs stating source-reply sink should handle it (openclaw#97167) * fix(message): route WebChat sends to source sink * fix(webchat): preserve message tool source replies --------- Co-authored-by: Peter Steinberger <[email protected]>
Closes #96840
Related: #96850 (closed as superseded)
What Problem This Solves
Fixes an issue where users in an active WebChat conversation could not use a targetless
message.send: OpenClaw returnedAction send requires a targetinstead of showing the tool message in the current chat. The fix also preserves the ordinary automatic final answer after the tool message.Why This Change Was Made
WebChat direct runs intentionally use automatic final replies, while targetless message-tool sends need the existing current-run internal source sink. This change keeps those contracts separate: the tool send selects the internal sink locally, confirmed source replies are projected into the transcript/UI, and source-mirror payloads bypass outbound-message dedupe. Explicit external routes and
message_tool_onlyruns keep their existing behavior.No config, schema, dependency, migration, reusable WebChat outbound channel, or protocol change is included.
User Impact
Agents can send visible progress or intermediate results with targetless
message.sendin the current WebChat conversation and still provide a normal visible final answer. External routed sends are unaffected.Evidence
The permanent integration executes the real path:
createMessageTool→runMessageActioncurrent-run sink → tool-result extraction → embedded payload construction → final reply dedupe.It proves the result contains both the source mirror and the automatic final, even when matching message-tool sent-text evidence is present.
Focused proof:
node scripts/run-vitest.mjs run --config test/vitest/vitest.agents-tools.config.ts --configLoader runner src/agents/tools/message-tool.internal-source-reply.integration.test.ts --reporter=dot --maxWorkers=1— 1/1 passed.node scripts/run-vitest.mjs run --config test/vitest/vitest.auto-reply-reply.config.ts --configLoader runner src/auto-reply/reply/agent-runner-payloads.test.ts --reporter=dot --maxWorkers=1— 65/65 passed.node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/ui/e2e/chat-flow.e2e.test.ts -t "keeps a targetless message-tool source reply beside the automatic final reply" --reporter=verbose --maxWorkers=1— Chromium 1 passed, 16 skipped.check:changedpassed on Blacksmith Testbox providerblacksmith-testbox, idtbx_01kwder0yyzbvqg0k1em246p6t, Actions run 28483225303.