Skip to content

[codex] surface rollout budget exhaustion - #29715

Merged
rka-oai merged 2 commits into
mainfrom
codex/rollout-budget-exhausted-error
Jun 23, 2026
Merged

[codex] surface rollout budget exhaustion#29715
rka-oai merged 2 commits into
mainfrom
codex/rollout-budget-exhausted-error

Conversation

@rka-oai

@rka-oai rka-oai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • surface shared rollout-budget exhaustion as CodexErr::RolloutBudgetExceeded instead of a generic interrupted turn
  • map it through the existing CodexErrorInfo and app-server v2 codexErrorInfo path
  • keep local compaction from retrying after the shared rollout budget is exhausted

This gives app-server clients a stable rolloutBudgetExceeded error they can classify without guessing from status="interrupted".

Tests

  • just test -p codex-core rollout_budget

@rka-oai
rka-oai marked this pull request as ready for review June 23, 2026 21:30
@rka-oai
rka-oai requested a review from a team as a code owner June 23, 2026 21:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8a90dbabd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

#[ts(export_to = "v2/")]
pub enum CodexErrorInfo {
ContextWindowExceeded,
RolloutBudgetExceeded,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Regenerate app-server schema artifacts

Adding RolloutBudgetExceeded changes the v2 app-server wire enum, but the checked-in generated artifacts still omit the new rolloutBudgetExceeded value (for example, codex-rs/app-server-protocol/schema/typescript/v2/CodexErrorInfo.ts:12, and the JSON schemas do not contain it). Clients generated from these fixtures will still reject or fail to classify the new error this change is meant to expose, so please run just write-app-server-schema and update the app-server docs list of common codexErrorInfo values with the new variant.

AGENTS.md reference: AGENTS.md:L288-L293

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

doing this now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@rka-oai rka-oai changed the title [core] surface rollout budget exhaustion [codex] surface rollout budget exhaustion Jun 23, 2026
#[serde(rename_all = "snake_case")]
pub enum CodexErrKind {
TurnAborted,
RolloutBudgetExceeded,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SessionBudgetExceeded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh sorry - just saw this, replacing with follow up PR

@rka-oai rka-oai Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd personally vote for RolloutBudgetExceeded instead since session is a bit of an overloaded term in the harness already

@rka-oai
rka-oai merged commit bbbea91 into main Jun 23, 2026
31 checks passed
@rka-oai
rka-oai deleted the codex/rollout-budget-exhausted-error branch June 23, 2026 22:01
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants