Honor workspace spend controls in rate-limit handling - #33187
Merged
copyberry[bot] merged 1 commit intoJul 14, 2026
Merged
Conversation
## Why Sparse and out-of-order rate-limit updates can omit account metadata or let an older full read overwrite a newer workspace hard stop. Credit availability also does not always include a displayable balance. ## What changed - Propagate the backend's `spendControlReached` state through rate-limit snapshots and the app-server protocol, preserving it across sparse updates. - Keep workspace hard-stop classifications for error routing and ignore stale full-read results after a newer hard-stop notification. - Base TUI warnings and model-switch prompts on credit availability and hard-stop state, and show `Credits: Available` when a finite balance is hidden. ## Testing Added coverage for spend-control mapping, snapshot merging, out-of-order reads, workspace error routing, warning and prompt behavior, and credit status display. GitOrigin-RevId: 18b09d493d5a620a7c079fb721ec50b38dd5b04c
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/18b09d493d5a620a7c079fb721ec50b38dd5b04c
branch
from
July 14, 2026 22:44
be6c064 to
4df8027
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/18b09d493d5a620a7c079fb721ec50b38dd5b04c
branch
July 14, 2026 22:45
nutmiguelelias-blip
temporarily deployed
to
issue-triage
July 14, 2026 22:55 — with
GitHub Actions
Inactive
nutmiguelelias-blip
temporarily deployed
to
issue-triage
July 14, 2026 22:55 — with
GitHub Actions
Inactive
nutmiguelelias-blip
temporarily deployed
to
issue-triage
July 14, 2026 22:55 — with
GitHub Actions
Inactive
fanyang-mono
temporarily deployed
to
issue-triage
July 14, 2026 22:56 — with
GitHub Actions
Inactive
fanyang-mono
temporarily deployed
to
issue-triage
July 14, 2026 22:56 — with
GitHub Actions
Inactive
fanyang-mono
temporarily deployed
to
issue-triage
July 14, 2026 22:56 — with
GitHub Actions
Inactive
fanyang-mono
temporarily deployed
to
issue-triage
July 14, 2026 22:57 — with
GitHub Actions
Inactive
Thatguy-didit
temporarily deployed
to
issue-triage
July 14, 2026 23:55 — with
GitHub Actions
Inactive
Thatguy-didit
temporarily deployed
to
issue-triage
July 14, 2026 23:55 — with
GitHub Actions
Inactive
Thatguy-didit
temporarily deployed
to
issue-triage
July 14, 2026 23:55 — with
GitHub Actions
Inactive
Thatguy-didit
temporarily deployed
to
issue-triage
July 14, 2026 23:56 — with
GitHub Actions
Inactive
isolomatov-gd
temporarily deployed
to
issue-triage
July 15, 2026 01:09 — with
GitHub Actions
Inactive
isolomatov-gd
temporarily deployed
to
issue-triage
July 15, 2026 01:09 — with
GitHub Actions
Inactive
isolomatov-gd
temporarily deployed
to
issue-triage
July 15, 2026 01:09 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Honor workspace spend controls in rate-limit handling
Why
Sparse and out-of-order rate-limit updates can omit account metadata or let an
older full read overwrite a newer workspace hard stop. Credit availability also
does not always include a displayable balance.
What changed
spendControlReachedstate through rate-limitsnapshots and the app-server protocol, preserving it across sparse updates.
full-read results after a newer hard-stop notification.
state, and show
Credits: Availablewhen a finite balance is hidden.Testing
Added coverage for spend-control mapping, snapshot merging, out-of-order reads,
workspace error routing, warning and prompt behavior, and credit status display.