fix(server): retry provider session opens before failing the run - #13113
Conversation
#12790 set a run to failed at the first session open failure. The effect worker then had nothing to retry, so a short open failure ended the run. This broke SelectionRestart.integration.test.ts on the base branch. The worker now tells the executor if it will retry a failure. Turn start returns the open error while retries remain, and settles the run as failed only on the last attempt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped server bug fix that defers provider-session failure settlement only while the existing effect retry budget remains, while preserving final-attempt behavior and adding regression coverage. It introduces no schema, deployment, product-default, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
…y patch" Upstream fixed the underlying regression in pingdotgg#13113 (retry provider session opens before failing the run), and the original selection restart test passes 9/9 on the current t3code/codex-turn-mapping head. Keeping the patch would drop the retry coverage pingdotgg#13113 restored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #12790, a run fails at the first provider session open error. The effect worker then has nothing to retry, so a short open failure ends the run.
SelectionRestart.integration.test.tsfails ont3code/codex-turn-mappingbecause of this, and every PR stacked on this branch is red.Fix
willRetryto the executor. It is true when a failure will be retried (attemptCount < maxAttempts).ProviderTurnStartService.startreturns the session open error whilewillRetryis true. On the last attempt, it sets the run to failed as fix(server): fail V2 runs when provider sessions cannot open #12790 does.The #12790 goal stays: a run never stays in
startingafter the worker stops retrying.Tests
ProviderTurnStartService.test.ts, "leaves the run starting when a session-open failure will be retried".SelectionRestart.integration.test.tspasses again.ProviderTurnStartService,SelectionRestart,EffectWorker, andRunExecutionService. Server typecheck is clean.This change was made by Claude Opus 5.5 with Claude Code.
🤖 Generated with Claude Code