Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): accept rate limit errors on thread resume #8897

MergednateEc(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/8897/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Fixes #8875.

A persisted Codex rateLimitExceeded value was rejected while decoding thread/resume, making affected historical threads permanently unresumable.

The generated resume schema now accepts the value, and the generator retains the narrow compatibility override so the next protocol refresh preserves it.

Verification: focused schema test and effect-codex-app-server typecheck.

Model and harness: GPT-5 Codex via Codex CLI.


Note

Low Risk Adds a backward-compatible enum variant to runtime validation only; no auth or persistence logic changes.

Overview Fixes decoding failures when persisted thread data includes rateLimitExceeded in turn errors, which blocked read, resume, and rollback for affected threads.

Adds applyCodex0151DefinitionCompatibility in the schema generator so CodexErrorInfo on V2ThreadReadResponse, V2ThreadResumeResponse, and V2ThreadRollbackResponse gains that enum value when upstream JSON schema omits it (same pattern as existing 0.150 overrides). Regenerated schema.gen.ts and a focused test assert all three response schemas accept the value.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3a4b9fa0af9c8e0eea5b996938fd6b0cac53bacb. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add rate-limit error variant to thread response schemas in codex-app-server

  • Adds a compatibility transformation in generate.ts that appends the rate-limit error value to the CodexErrorInfo enum for thread read, resume, and rollback responses when the upstream definition lacks it.
  • The transformation preserves existing Codex 0.150 compatibility overrides and only applies when no override is present.
  • Regenerates schema.gen.ts and adds tests in schema.test.ts verifying all three response schemas accept a failed turn with the rate-limit error.
Macroscope summarized 3a4b9fa.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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: Team

      Run ID: c28c0dcd-f3ab-4817-a24b-0d0108dd616c

      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

      Warning

      Your free Security trial is over. An organization admin can upgrade to Advanced for continuous pull request security review or dismiss this notice.


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

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 3a4b9fa

      Macroscope's review found this PR approvable — This is a small, backwards-compatible schema compatibility fix that allows an existing thread response path to accept persisted rate-limit errors without changing other payload handling. The generator, generated schemas, and focused nested-response tests are all confined to the codex app-server package.

      Notes:

      • No code objects were reviewed. Approvability was decided on eligibility alone.
      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. github-actions[bot](GitHub profile, opens in a new tab) removed labelsvouch:unvouched

    5. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    6. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 66d0cf198ee19c1a0cf600e5c7260607e1bab396. Configure [here](https://www.cursor.com/dashboard/bugbot).

Sign in to join this conversation.