Skip to content

fix(server): retry provider session opens before failing the run - #13113

Merged
juliusmarminge merged 1 commit into
t3code/codex-turn-mappingfrom
fix/v2-retry-session-open
Sep 22, 2026
Merged

juliusmarminge merged 1 commit into
t3code/codex-turn-mappingfrom
fix/v2-retry-session-open

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 22, 2026

Copy link
Copy Markdown
Member

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.ts fails on t3code/codex-turn-mapping because of this, and every PR stacked on this branch is red.

Fix

The #12790 goal stays: a run never stays in starting after the worker stops retrying.

Tests

  • New: ProviderTurnStartService.test.ts, "leaves the run starting when a session-open failure will be retried".
  • SelectionRestart.integration.test.ts passes again.
  • 76 tests pass in ProviderTurnStartService, SelectionRestart, EffectWorker, and RunExecutionService. Server typecheck is clean.

This change was made by Claude Opus 5.5 with Claude Code.

🤖 Generated with Claude Code

#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>
@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 22, 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: f2b8f97 · 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.

@macroscopeapp

macroscopeapp Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at f2b8f97

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.

@juliusmarminge
juliusmarminge merged commit 5dd329c into t3code/codex-turn-mapping Sep 22, 2026
24 checks passed
@juliusmarminge
juliusmarminge deleted the fix/v2-retry-session-open branch September 22, 2026 21:44
juliusmarminge pushed a commit that referenced this pull request Sep 23, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
saphid pushed a commit to saphid/t3code that referenced this pull request Sep 23, 2026
…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>
juliusmarminge pushed a commit that referenced this pull request Sep 23, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge pushed a commit that referenced this pull request Sep 23, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge pushed a commit that referenced this pull request Sep 23, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge pushed a commit that referenced this pull request Sep 23, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge pushed a commit that referenced this pull request Sep 23, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge pushed a commit that referenced this pull request Sep 24, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge pushed a commit that referenced this pull request Sep 24, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge pushed a commit that referenced this pull request Sep 24, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge pushed a commit that referenced this pull request Sep 25, 2026
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants