Uh oh!
There was an error while loading. Please reload this page.
fix(codex): accept rate limit errors on thread resume - #8897
Conversation
- Add rateLimitExceeded to the thread resume error schema. - Preserve the compatibility rule in the schema generator. - Verify with the focused schema test and package typecheck.
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Uh oh!
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Approved at 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:
You can add or adjust custom eligibility rules. Learn more. |
将 Codex 的 rateLimitExceeded 兼容范围扩展至读取、恢复和回滚线程响应。 同步生成器规则与生成 schema,并新增三类响应的回归断言。 验证:schema 测试 3/3、effect-codex-app-server typecheck、格式检查通过。
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 66d0cf1. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
通过完整 thread/read、thread/resume 与 thread/rollback 响应验证限流错误的嵌套解码。\n\n将响应断言函数提升到模块作用域,避免每次测试重复编译 Schema。\n\n验证:聚焦 schema 测试与包类型检查通过。

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
rateLimitExceededin turn errors, which blocked read, resume, and rollback for affected threads.Adds
applyCodex0151DefinitionCompatibilityin the schema generator soCodexErrorInfoonV2ThreadReadResponse,V2ThreadResumeResponse, andV2ThreadRollbackResponsegains that enum value when upstream JSON schema omits it (same pattern as existing 0.150 overrides). Regeneratedschema.gen.tsand a focused test assert all three response schemas accept the value.Reviewed by Cursor Bugbot for commit 3a4b9fa. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add rate-limit error variant to thread response schemas in
codex-app-serverCodexErrorInfoenum for thread read, resume, and rollback responses when the upstream definition lacks it.Macroscope summarized 3a4b9fa.