fix(ui): preserve autonomous tool failures#100514
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bff2b0e9f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - **Managed browser cookie persistence:** initialize new isolated macOS headless profiles with a non-interactive encryption key while preserving existing profile keys, and close Chromium through CDP before bounded signal fallback so persistent logins survive graceful browser and Gateway restarts. (#96704, #98284) Thanks @TurboTheTurtle. | ||
| - **MCP OAuth response bounds:** reject body-less foreign error bodies without calling their inherently unbounded `text()` fallback, while preserving HTTP status and headers for safe SDK diagnostics. (#98143) Thanks @Pick-cat. | ||
| - **Control UI approval prompts:** keep stale resolve failures and busy-state cleanup from leaking across newer approvals or Gateway reconnects. (#98394) Thanks @haruaiclone-droid. | ||
| - **Control UI autonomous tool failures:** keep an earlier failed turn's Tool error visible when a later autonomous turn recovers without an intervening user message. (#98888) Thanks @qingminglong. |
There was a problem hiding this comment.
Remove the hand-written changelog entry
When this non-release fix lands as-is, it directly edits CHANGELOG.md even though the root AGENTS.md Docs / Changelog rule says the changelog is release-only and normal fixes/direct main commits should put release-note context in the PR body, squash message, or direct commit. Please drop this line so release generation remains the sole owner of the changelog and does not have to reconcile a hand-maintained entry/credit.
Useful? React with 👍 / 👎.
Co-authored-by: qingminlong <[email protected]>
1bff2b0 to
7680336
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 9:12 PM ET / 01:12 UTC. Summary PR surface: Source +11, Tests +133. Total +144 across 3 files. Reproducibility: yes. Current main's shared chat annotation only resets at user groups, and Gateway source shows Review metrics: none identified. Stored data model 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. Next step before merge
Security Review detailsBest possible solution: Land this focused provenance-boundary fix after exact-head gates and maintainer handling pass, then let the linked issue close through the merged PR and release-note generation path. Do we have a high-confidence way to reproduce the issue? Yes. Current main's shared chat annotation only resets at user groups, and Gateway source shows Is this the best way to solve the issue? Yes. The PR uses the durable AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 60cf7eaa005b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +11, Tests +133. Total +144 across 3 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
|
|
Land-ready maintainer pass complete on Verification:
No known proof gaps for the touched Control UI history surface. |
|
Merged via squash.
|
* fix(ui): preserve autonomous tool failures Co-authored-by: qingminlong <[email protected]> * chore: defer release note to maintainer batch --------- Co-authored-by: qingminlong <[email protected]>
* fix(ui): preserve autonomous tool failures Co-authored-by: qingminlong <[email protected]> * chore: defer release note to maintainer batch --------- Co-authored-by: qingminlong <[email protected]>
What Problem This Solves
When two autonomous agent turns are adjacent in Control UI history, a successful reply in the later turn could make a failed tool from the earlier turn render as Tool output instead of Tool error.
Fixes #97849. Supersedes #98888 after its contributor fork could not retain the reviewed rebase ancestry; contributor credit is preserved through co-authorship and the maintainer release-note batch.
Why This Change Was Made
Gateway chat-history projection preserves
sessions_sendinput provenance while displaying those messages as assistant-side forwarded groups. The Control UI now treats only groups withkind: inter_sessionandsourceTool: sessions_sendas autonomous-turn boundaries before annotating tool outcomes.The implementation deliberately does not use
senderLabelalone: ordinary relay-labeled assistant replies still count as replies to the current turn. Existing non-text assistant content behavior is unchanged.User Impact
Earlier autonomous tool failures remain visibly failed when a later autonomous turn recovers, while normal labeled assistant replies continue to mark their own tool turn as successful.
Evidence
["Tool error", "Tool output"]before and after history reload.pnpm check:changedpassed on the reviewed source tree.git diff --checkpassed.The replacement keeps the focused implementation in one maintainer commit with
Co-authored-by: qingminlong <[email protected]>. The contributor thank-you is queued in the maintainer-owned release-note batch.AI-assisted: Yes (Codex).