Repository navigation
fix(ui): keep one agent run in one transcript response - #126278
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 22, 2026, 8:43 PM ET / August 23, 2026, 00:43 UTC. ClawSweeper reviewWhat this changesThe PR groups narration, tool activity, live status, and terminal output from one agent run into a single Control UI transcript response with terminal-only actions. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open: this member-authored, protected PR targets a valid Control UI defect, and the prior announcement finding appears addressed. A merge verdict is blocked by the review checkout: its PR base cannot be resolved and the required Codex source checkout is unavailable for direct contract inspection. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGateway history and live agent events become Control UI chat items, which are grouped and rendered as transcript rows. The change propagates run identity so related rows share one response frame while only the terminal assistant message can expose actions or announcements. flowchart LR
A[Gateway history and live events] --> B[Session identity projection]
B --> C[Chat item grouping]
C --> D[Run frame coalescing]
D --> E[Transcript renderer]
E --> F[Terminal actions and announcements]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +858, Tests +1260. Total +2118 across 47 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Mantis proof suggestionA redacted Control UI chat transcript capture would directly demonstrate the intended single response frame and terminal-only actions. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Review the exact head from a full clone with the PR base and sibling Codex checkout available, then retain the single canonical run-frame path only if its production growth is justified by removing the prior ordering-based grouping behavior. Do we have a high-confidence way to reproduce the issue? No: the supplied issue has a deterministic mocked-Gateway scenario, but this grafted checkout cannot resolve the PR base to reproduce and compare the reported current-main behavior. Is this the best way to solve the issue? Unclear: the inspected frame and announcement paths are coherent and address the prior finding, but a full base comparison and Codex contract check are needed before calling this the best fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 008412212f43. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
a3b5fb8 to
66b68d0
Compare
a704e9d to
b6c0c32
Compare
|
Merged via squash.
|
* fix(ui): compose agent run transcript responses * fix(ui): preserve explicit run transcript boundaries * fix(ui): preserve run transcript status * fix(ui): preserve live agent run content * fix(ui): preserve semantic agent run frames * fix(ui): complete agent run transcript ownership * fix(ui): stabilize agent run transcript lifecycle * fix(ui): complete agent run frame ownership * fix(ui): close transcript ownership races * test(gateway-client): drop non-regressing projection case --------- Co-authored-by: RoboClaw <[email protected]>
Closes #126276
Related: #124123
Related: #126093
What Problem This Solves
Fixes an issue where one tool-using agent run appeared in the Control UI as several separate responses. Interleaved narration, tool activity, and final output repeated the sender frame, exposed actions on intermediate text, and could suppress the final screen-reader announcement.
Why This Change Was Made
The Control UI now applies one run-owned frame after stream, completed-work, and activity grouping. Codex persists the authoritative run identity separately from per-message idempotency, while the frame owns an explicit active/completed/failed outcome and terminal action owner. Existing compaction activity, post-steer remount, and virtualizer disclosure anchoring remain canonical.
Hard boundaries remain around different run IDs, user turns, explicit turn boundaries, forwarded input, notices, dividers, unowned rows, and failed runs. Active, commentary-only, tool-only, aborted, timed-out, and failed frames expose no terminal Reply/Copy actions or final-response announcement.
User Impact
A run can narrate work, show compact tool activity, continue narrating, and finish inside one linear response. Its final answer is announced separately from the preamble, only the terminal answer owns actions, and embedded activity retains the intended desktop/mobile width.
Production delta:
+1254 / -427(+827net). Test delta:+1234 / -40(+1194net). The production growth is the run-frame capability plus explicit producer-owned run/terminal contracts replacing ordering and idempotency inference.Evidence
chat-transcript-disclosure-anchor.e2e.test.ts.node scripts/check-changed.mjspassed formatting, max-lines, assertion safety, typechecks, oxlint/stylelint, extension boundaries, dead exports, i18n, and import cycles on the final rebased head.82 > 80); the other 87 cases passed.origin/mainbaseline failed with 5 assistant groups instead of 4 and changed the heartbeat row key; the PR head passed both assertions.git fetch origin && codex review --base origin/mainran recursively. Two P2 findings were accepted and fixed (active persisted-narration announcement; stalerunTerminalremoval). The final review reported:No discrete, actionable correctness defects were identified(~/briefs/fix-126278/codex-review-5.log).agentic-agents-tools(89 files / 2,053 tests).~/briefs/fix-126278/blast-radius.md.Before / After
origin/mainBoth screenshots use the same 1200x900 Playwright viewport and deterministic transcript fixture. The visible difference is the tighter single-frame composition of the first run; the assertions additionally prove terminal-only actions and stable heartbeat row identity.
Codex contract checked directly against
../codex/codex-rs/app-server/tests/suite/v2/compaction.rsand../codex/codex-rs/app-server/src/bespoke_event_handling.rs: v2 compaction emits one canonicalContextCompactionitem through start/completion, while OpenClaw carries run ownership separately.Final head:
15d80d36b8980a394dec48b8e36711bcd11ca946.