Skip to content

fix: preserve retry turn handoff - #468

Open
Safa675 wants to merge 1 commit into
miuuyy:mainfrom
Safa675:fix/retry-turn-id-handoff
Open

Safa675 wants to merge 1 commit into
miuuyy:mainfrom
Safa675:fix/retry-turn-id-handoff

Conversation

@Safa675

@Safa675 Safa675 commented Sep 12, 2026

Copy link
Copy Markdown

A retryable ChatGPT Web 503 can cause Codex to retry the same user instruction under a new native turn_id. The browser adapter currently rejects that replay as stale, so the task cannot resume after model capacity recovers.

This change records a process-local handoff only for retryable 503 failures emitted by this daemon, binds the exact failed user revision to a single successor turn, and clears the handoff when a fresh instruction arrives. It also adds lifecycle regressions for the accepted retry path and for rejecting a different stale instruction.

Validation:

  • bun test tests/server-lifecycle.test.ts — 37/37 passed during the original verification run
  • ./node_modules/.bin/tsc --noEmit — passed after reopening the execution session
  • git diff --check — passed

The repository-wide verify remains blocked by pre-existing dependency audit findings in the pinned hono and js-yaml dependencies.

Copilot AI lite review requested due to automatic review settings September 12, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants