Skip to content

fix(web): stop marking mixed tool runs as failed - #7893

Merged
t3dotgg merged 2 commits into
mainfrom
t3code/improve-grouped-tool-errors
Aug 22, 2026
Merged

fix(web): stop marking mixed tool runs as failed#7893
t3dotgg merged 2 commits into
mainfrom
t3code/improve-grouped-tool-errors

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Aug 22, 2026

Copy link
Copy Markdown
Member

One failed tool call made a mostly successful tool run look like the entire run failed. Real Codex tool failures were also marked successful, so more serious errors could disappear.

Show the failure icon when the final tool call in a group fails. Preserve real tool outcomes for new Codex events and existing threads across web and mobile.

Tests: 120 focused tests, web and server typechecks, targeted lint, and formatting.

Model: GPT-5.6 Sol
Harness: Codex in T3 Code


Note

Medium Risk
Touches Codex item-status mapping and activity projection that feed web/mobile tool UI. Wrong status handling could hide or overstate tool failures, but the change is small and covered by tests.

Overview
Tool groups no longer show a failure icon unless every call in the group failed, so mixed-success runs stay neutral.

Codex item.completed events now keep real failed/declined item statuses instead of always mapping to completed. Activity payload projection does the same for stored threads so web and mobile still see those outcomes.

Reviewed by Cursor Bugbot for commit 3760cca. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix mixed tool runs being marked as failed in activity projection and timeline

  • Server-side projectActivityPayload now overrides a top-level payload.status of "completed" with the embedded item.status when it is "failed" or "declined" (ActivityPayloadProjection.ts).
  • mapItemLifecycle in the Codex adapter propagates "failed" or "declined" from the source item into item.completed events instead of always emitting "completed" (CodexAdapter.ts).
  • Web deriveMessagesTimelineRows computes hasFailure for work-toggle groups from the last visible grouped entry only, so mixed-success groups ending in success are no longer marked failed (MessagesTimeline.logic.ts).
  • Adds tests across adapter, projection, timeline logic, and component rendering to cover mixed-outcome tool groups.
  • Risk: hasFailure now reflects only the terminal entry in a tool group; groups where an earlier entry failed but the last entry succeeded will no longer show a failure indicator.

Macroscope summarized 70e686b.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 366693ca-9f9c-4b0d-ae53-e2f4a666707e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 22, 2026

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding: the overflow ("+N previous log entries") toggle's failure affordance now requires every hidden entry to have failed, which contradicts its own "Hidden work includes a failure" semantics and hides a single failure behind a collapsed group.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/chat/MessagesTimeline.logic.ts Outdated
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.4 KiB 13.4 KiB +6 B (+0.0%) 15.1 KiB
Codex Thread snapshot wire 6.9 KiB 6.9 KiB +13 B (+0.2%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.5 KiB −7 B (−0.1%) 7.8 KiB
Codex Live turn WebSocket decoded 55.0 KiB 55.0 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 16 16 0 (0.0%) 21
Claude Total thread wire 13.4 KiB 13.4 KiB +11 B (+0.1%) 15.1 KiB
Claude Thread snapshot wire 6.9 KiB 6.9 KiB −3 B (−0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 6.6 KiB +14 B (+0.2%) 7.8 KiB
Claude Live turn WebSocket decoded 55.8 KiB 55.8 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 16 16 0 (0.0%) 21

Baseline: 11f0513 · PR result: 70e686b · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Skipped

Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically.

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding on the collapsed tool-group failure indicator in apps/web/src/components/chat/MessagesTimeline.logic.ts. Server-side changes are outside this check's scope.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/chat/MessagesTimeline.logic.ts
@t3dotgg
t3dotgg merged commit ce91284 into main Aug 22, 2026
23 of 24 checks passed
@t3dotgg
t3dotgg deleted the t3code/improve-grouped-tool-errors branch August 22, 2026 11:18
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant