fix(server): keep interrupted threads resumable after restarts #10421
main fromrefs/pull/10421/head·merged by maria-rcks View on GitHubrestart and update recovery could mark active threads failed when the provider directory held an older turn id; codex resume could also fail while decoding historical errors from another provider version. recovery now uses orchestration's active turn, and codex validates only the resume metadata it consumes. excludeTurns trims the response while preserving the model's saved context; the request interface no longer needs a generic method or test cast.
verified 204 scoped tests, server typecheck, lint, and formatting on the final change. both persisted restart/update regressions fail on the original guards and pass here.
additional end-to-end checks with real codex:
- desktop-mode restart during a blocked shell command recalled a key and number from an earlier turn, wrote their exact value, read it separately, and finished ready.
- web-mode update recovery used the real preparation hook with automatic continuation disabled; the marked thread recalled its earlier key and number, retained its provider thread id, and cleared its update marker.
- a second interruption of that same remote thread using
sigkillrecovered the original values again and finished ready. - an unmarked thread with continuation disabled stayed interrupted; an explicitly stopped thread stayed stopped; a completed thread kept its original timestamp and message count across subsequent restarts.
verification limits: native electron quit/relaunch and the update package installer were not exercised. the web client intermittently retained "syncing messages" after reload and completion; sending and completing the follow-up worked, but the indicator's cause remains unverified and is outside this server fix.


model: gpt-6-astra. harness: codex.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Approvability#
Verdict: Would Approve
Macroscope's review found this PR approvable — This is a localized server bug fix that preserves interrupted provider work across restarts and makes Codex resume tolerant of unrelated historical payloads. Existing continuation remains gated by the prior opt-in or update-marking flows, with focused tests covering the changed recovery cases.
Not approved because:
- Monthly spending limit reached (workspace setting). Approvability relies on correctness review in order to determine eligibility
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.
maria-rcks merged this1abc717
maria-rcks closed this
Sign in to join this conversation.
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.