Skip to content

fix(server): classify Claude V2 structured terminal failures - #9897

Open
saphid wants to merge 386 commits into
pingdotgg:t3code/codex-turn-mappingfrom
saphid:fix/v2-claude-terminal-failures-20260905
Open

fix(server): classify Claude V2 structured terminal failures#9897
saphid wants to merge 386 commits into
pingdotgg:t3code/codex-turn-mappingfrom
saphid:fix/v2-claude-terminal-failures-20260905

Conversation

@saphid

@saphid saphid commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Claude structured failures can carry success-shaped SDK results. Current V2 already classifies these failures; preserve that upstream behavior and its authentication/rate-limit hints, retain the terminal reason as the failure code, and prevent structured error text becoming a synthetic assistant reply.

Rebuilt on V2 7dd9873ed with test-only prerequisite #10865 (merge first). Current head 6f221e835; remaining topic is two files, 69 additions and 4 deletions.

Validation: 132 focused Claude adapter and persistence tests pass, plus server typecheck, targeted lint and formatting. New CI pending. Direct Claude Opus 5 high review remains unavailable: launcher exited 1 on expired OAuth before inference; no Claude review occurred.

Targets V2 #2829. Updated with GPT-6 in Codex/T3.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 5, 2026

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 34fb3afa45c930d74626a510d7c77a10af98e98f. Configure here.

Comment thread apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 6f221e8

Macroscope's review found this PR approvable — This is a contained Claude adapter fix that correctly surfaces structured terminal failures as failures instead of synthetic assistant messages, with targeted regression coverage for the supported failure reasons. The remaining change only updates a persistence test assertion and does not alter production persistence behavior.

You can add or adjust custom eligibility rules. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 5, 2026
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from b82facd to 2ac9bfe Compare September 5, 2026 04:56
@saphid
saphid force-pushed the fix/v2-claude-terminal-failures-20260905 branch from ec393e0 to e8450cd Compare September 5, 2026 05:09
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from 9242b91 to 3d81172 Compare September 8, 2026 03:31
juliusmarminge and others added 20 commits September 7, 2026 23:12
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
- Re-route steering that races completion into idempotent follow-up dispatches
- Preserve scheduled-task attribution and provider ownership history across clients
Port main's pull-request discovery, active thread ordering, async question dismissal, settlement fixes, provider-session import, attachment context, and provider correctness changes into orchestration v2.

Keep the branch's intentional composer and subagent behavior while adopting main's web and mobile fixes. Prevent headless setup terminals from hanging on the color probe, and move the v2 migration block to 050-061 after main claimed 048-049.
Restore the failed-before-start timer guard, align two server fixtures with the reconciled behavior, and remove dead files, exports, and dependencies surfaced by Knip.

Drop the temporary branch push trigger now that the PR is mergeable, so each update runs the pull-request workflow once.
Keep main's batch machine-update banner and update action while preserving the v2 runtime-based environment lock used by draft load balancing.
Adopt TypeScript 7 and Effect rc.112 across orchestration v2, including the TaggedError API migration and updated Effect-aware tests. Restore main's composer-aware scroll-to-end clearance while retaining selected-model settings sync, preview recording transfer, image galleries, desktop context menus, and layout hit targets. Regenerate the lockfile on the upgraded dependency baseline.
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch from efd9994 to 6102d00 Compare September 8, 2026 06:23
juliusmarminge and others added 7 commits September 8, 2026 14:26
Advertise bounded socket snapshots and authoritative dispatch validation, omit raw command output and inline file bodies at the wire boundary, and preserve compact status metadata across web and mobile. Add transport-budget coverage for snapshots, resume, commands, legacy import, and projection maintenance.
@saphid
saphid force-pushed the fix/v2-claude-terminal-failures-20260905 branch from b106506 to 6f221e8 Compare September 9, 2026 00:33
@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@macroscopeapp
macroscopeapp Bot dismissed their stale review September 9, 2026 00:34

Dismissing prior approval to re-evaluate 6f221e8

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Sep 9, 2026
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch from 8187b17 to ada72ce Compare September 9, 2026 06:39
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.

5 participants