Skip to content

fix(server): surface actionable provider failure messages - #12560

Merged
juliusmarminge merged 3 commits into
t3code/codex-turn-mappingfrom
fix-provider-turn-start-failure
Sep 20, 2026
Merged

juliusmarminge merged 3 commits into
t3code/codex-turn-mappingfrom
fix-provider-turn-start-failure

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Provider startup and stream failures can collapse actionable errors into "Provider turn failed." For example, a context handoff budget rejection loses the instruction to compact the conversation or choose a model with more context.

Translate known failure categories through wrapped adapter and Effect causes in the shared formatter. Handoff budget and uncertain-delivery errors retain recovery guidance; startup, stream, session-open, and resume failures get specific next steps. Unknown defect text stays internal. Preserve explicit messages, credential redaction, and message length limits, with guarded and bounded cause traversal.

Targets #2829. This changes error reporting only; it adds no legacy reconciliation or database migration.

Verification:

  • 50 focused tests passed, including wrapped handoff errors, persisted startup/stream failures, and unreadable causes.
  • Targeted lint, server typecheck, formatting, and diff checks passed.
  • Backend regression tests demonstrate the before/after behavior; screenshots are not applicable.

Authored with Codex.

@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 Sep 19, 2026
Comment thread apps/server/src/orchestration-v2/ProviderFailure.ts Outdated
Comment thread apps/server/src/orchestration-v2/ProviderFailure.ts
@macroscopeapp

macroscopeapp Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Effect Service Conventions found a blocking error-boundary violation.

Posted via Macroscope — Effect Service Conventions

@macroscopeapp

macroscopeapp Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 1388b45

Macroscope's review found this PR approvable — This is a narrowly scoped server bug fix that improves messages for existing provider failure paths without changing workflows, defaults, schemas, or deployment behavior. The new cause handling is bounded and covered by targeted tests.

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

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Sep 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.1 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅
Codex Live turn messages — 1 — 8 ✅
Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: 1388b45 · 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: 106.1 KiB
  • Claude decoded thread snapshot: 106.4 KiB

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

@juliusmarminge
juliusmarminge merged commit 905d6a1 into t3code/codex-turn-mapping Sep 20, 2026
24 of 25 checks passed
@juliusmarminge
juliusmarminge deleted the fix-provider-turn-start-failure branch September 20, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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