Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): treat a missing Codex rollout as a recoverable resume error #6671

MergedRishet11(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/6671/headmerged by juliusmarminge View on GitHub

What Changed

If the Codex rollout behind a thread went missing, that thread became permanently unusable. Sending a message failed with a provider error, the thread kept showing as needing attention, and retrying produced the same failure every time. There was no way to recover it from the UI.

T3 already knows how to handle this class of problem: when it cannot resume a Codex thread, it starts a fresh one instead of giving up. It decides whether an error is recoverable by looking at the message Codex sends back. When the rollout is gone, that message is:

no rollout found for thread id 019fdf74-aaa9-7950-b252-7cc7a8650470

The recoverable list held not found, missing thread, no such thread, unknown thread and does not exist. The phrase above contains the word "found", but not the substring not found, and matches none of the others. So a recoverable situation was read as fatal and the fallback never ran.

Added no rollout found to that list.

Why

A missing rollout is precisely what the fallback is for. There is no transcript left to resume, so starting a fresh thread is the only sensible outcome, and it is already what happens for missing thread and does not exist. This adds one more wording to an existing behaviour rather than introducing new handling.

The check still requires the message to mention a thread before any snippet is considered, so this cannot widen matching to unrelated failures.

One correction to the report: it points at Settle, but thread.settle refuses a thread that still has an active session and never reaches this code. The stack trace in the issue runs through turn start (processTurnStartRequested -> ensureSessionForThread -> startSession), which is the path this fixes.

UI Changes

n/a - nothing looks different. The thread recovers instead of staying stuck.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (n/a)
  • I included a video for animation/interaction changes (n/a)

Verification

vp test run apps/server/src/provider/Layers/CodexSessionRuntime.test.ts   # 21 passed
vp run --filter t3 typecheck                                             # exit 0, no errors
vp lint  apps/server/src/provider/Layers/CodexSessionRuntime.ts apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
vp fmt --check <same two files>

Removing the new entry makes the added test fail, so it exercises the changed line rather than passing incidentally.

Fixes #5680

Implemented with Claude Opus 5 via Claude Code.

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

    2. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: fd88c3be-932f-4400-9040-80a02c40ae47

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    3. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    4. Approvability

      Verdict: Approved 507caa5

      This PR adds a single error message pattern to an existing list of recoverable resume errors, with a corresponding test. The change is minimal, self-contained, and has clear intent with no unintended side effects.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. CodexSessionRuntime.test.ts on the PR files: 21/21, including the new "no rollout found for thread id …" case.

      The snippet list already had "no such thread" / "unknown thread" / "does not exist". Codex's app-server uses "no rollout found" for the same situation. Matching it as recoverable so resume starts a fresh thread is right. MERGEABLE.

    6. Thanks for checking it. The four required checks are still sitting at "awaiting approval" since this is my first PR here, so they can't start on their own. Happy to rebase or adjust anything if it turns up something.

    7. juliusmarminge merged this51c6daa

    8. juliusmarminge closed this

Sign in to join this conversation.