Skip to content

[codex] rename rollout budget error to session budget error - #29744

Merged
rka-oai merged 1 commit into
mainfrom
codex/session-budget-exceeded
Jun 23, 2026
Merged

[codex] rename rollout budget error to session budget error#29744
rka-oai merged 1 commit into
mainfrom
codex/session-budget-exceeded

Conversation

@rka-oai

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

Copy link
Copy Markdown
Contributor

Summary

  • rename the rollout-budget exhaustion error from RolloutBudgetExceeded to SessionBudgetExceeded
  • expose the matching app-server v2 wire value as sessionBudgetExceeded
  • regenerate JSON/TypeScript schema fixtures and update the app-server docs and focused tests

This is a naming-only follow-up to #29715 based on Pavel's review suggestion. Runtime behavior is unchanged.

Tests

  • just test -p codex-core rollout_budget
  • just test -p codex-app-server-protocol
  • just fmt
  • just write-app-server-schema

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

@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: f838ee5543

ℹ️ 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".

pub enum CodexErrorInfo {
ContextWindowExceeded,
RolloutBudgetExceeded,
SessionBudgetExceeded,

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 Accept legacy rollout budget error names

When resuming or reading a rollout written before this rename, the persisted ErrorEvent still contains "codex_error_info":"rollout_budget_exceeded"; after this enum variant rename there is no serde(alias = "rollout_budget_exceeded"), so RolloutRecorder::load_rollout_items fails to deserialize that JSONL line and skips it. In the budget-exhaustion path an Error event is followed by TurnComplete, so dropping only the error makes the rebuilt thread history look completed instead of failed and hides the original budget error; keep the new serialized name, but accept the old one for rollout compatibility.

AGENTS.md reference: AGENTS.md:L103-L111

Useful? React with 👍 / 👎.

pub enum CodexErrorInfo {
ContextWindowExceeded,
RolloutBudgetExceeded,
SessionBudgetExceeded,

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 Preserve the v2 error code spelling

For app-server v2 clients that already switch on the documented codexErrorInfo string, this changes the server-emitted value from rolloutBudgetExceeded to sessionBudgetExceeded; those clients will miss the budget-exhaustion classification even though the rest of the error/turn payload shape is unchanged. If this is meant to be a Rust naming cleanup, keep the old wire spelling with a targeted serde rename (or otherwise version the API change) so existing app-server consumers continue to classify this error.

AGENTS.md reference: AGENTS.md:L103-L111

Useful? React with 👍 / 👎.

@rka-oai
rka-oai merged commit 1ec3def into main Jun 23, 2026
31 checks passed
@rka-oai
rka-oai deleted the codex/session-budget-exceeded branch June 23, 2026 23:49
@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