fix(agents): mirror internal ui message tool replies#85564
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-23 04:15 UTC / May 23, 2026, 12:15 AM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows current main can produce internal-ui source replies for message-tool-only sends, while the subscription/attempt path does not carry those payloads into final TUI output before this PR; I did not run a live Signal plus TUI repro in this read-only review. PR rating Rank-up moves:
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. Real behavior proof Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the narrow source-reply wiring after maintainer review, current-head CI confirmation, and acceptance that live Signal credentials are outside this PR's proof scope. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main can produce internal-ui source replies for message-tool-only sends, while the subscription/attempt path does not carry those payloads into final TUI output before this PR; I did not run a live Signal plus TUI repro in this read-only review. Is this the best way to solve the issue? Yes. The patch uses the existing internal-source reply contract and final-payload mirror instead of adding a parallel delivery path, while preserving dry-run and external-send exclusions with focused tests. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 463929d794a2. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Pearl Branchling Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
@clawsweeper re-review Updated the branch with a durable Verification added to the PR body:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ebc27e3 to
742faf1
Compare
|
@clawsweeper re-review Updated and force-pushed the rebased branch at Changes since the earlier review:
Verification after the final patch:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
* fix(agents): mirror internal ui message tool replies * test(tui): prove internal source reply rendering * fix(agents): preserve source reply idempotency
Summary
message.sendtool results that target the internal UI source reply sink.openclaw tuireceives visible output even when trailing assistant text is suppressed.Verification
node scripts/run-vitest.mjs src/agents/pi-embedded-subscribe.handlers.tools.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.suppresses-message-end-block-replies-message-tool.test.tsnode scripts/run-vitest.mjs src/agents/pi-embedded-runner/run/payloads.test.ts src/agents/pi-embedded-runner/run/message-tool-terminal.test.tsOPENCLAW_TUI_PTY_MIRROR_PATH=.artifacts/pr-85564/tui-source-reply.ansi OPENCLAW_TUI_PTY_COLS=100 OPENCLAW_TUI_PTY_ROWS=30 OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.tui-pty.config.ts src/tui/tui-pty-harness.e2e.test.ts -t "renders message-tool-only internal ui source replies in the terminal" --reporter=verboseOPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_TEST_PROJECTS_SERIAL=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=120000 node scripts/run-vitest.mjs run src/agents/pi-embedded-subscribe.handlers.tools.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.suppresses-message-end-block-replies-message-tool.test.ts src/agents/pi-embedded-runner/run/payloads.test.ts src/agents/pi-embedded-runner/run/message-tool-terminal.test.ts --reporter=verbosegit diff --checkcodex review --base origin/maincorepack pnpm check:changedReal behavior proof
Behavior addressed: TUI/internal UI message-tool-only turns no longer go silent after a successful
message.send; the same message-tool source reply payload is mirrored into the final chat payload path.Real environment tested: WSL checkout at
/root/src/openclaw-85538using the realrunTui()PTY loop with a fakeTuiBackend, plus Blacksmith Testbox through Crabbox on Linux for the changed gate.Exact steps or command run after this patch:
OPENCLAW_TUI_PTY_MIRROR_PATH=.artifacts/pr-85564/tui-source-reply.ansi OPENCLAW_TUI_PTY_COLS=100 OPENCLAW_TUI_PTY_ROWS=30 OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.tui-pty.config.ts src/tui/tui-pty-harness.e2e.test.ts -t "renders message-tool-only internal ui source replies in the terminal" --reporter=verbose.Evidence after fix: The PTY test passed and the ANSI mirror contained the visible terminal line
VISIBLE_TUI_SOURCE_REPLY_PROOF; the fixture also assertedsourceReplyTranscriptMirror.textwasVISIBLE_TUI_SOURCE_REPLY_PROOFbefore normalizing the payload into the chat final message shown byrunTui().Observed result after fix:
openclaw tui's real terminal loop rendered the message-tool-only internal-ui source reply instead of an empty final turn, while the existing focused tests still prove successful internal-ui sends are captured, dry-run/external sends are excluded, and idempotency keys are preserved.What was not tested: A live interactive Signal plus
openclaw tuisession with real channel credentials; the proof uses the production message-tool source-reply payload builder and real TUI PTY renderer without live Signal auth.Fixes #85538.