[codex] Add quota spend forecasting#145
Draft
xodapi wants to merge 1 commit into
Draft
Conversation
a2b46ef to
da6bbe1
Compare
da6bbe1 to
0024e5b
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
rate_limitsevents so the UI does not render null pseudo-limits--status-json, a compact privacy-preserving status payload for widgets/mobile clientsWhy
Codex can report account quota windows in
token_countevents, but users need more than the current remaining percentage. A small burn-rate estimate makes it easier to see whether the current pace is safe or likely to hit the cap before the window resets.The UI also benefits from treating Codex-only workspaces as a first-class case: when only Codex is active, the quota panel should prioritize Codex state and avoid showing an empty Claude half-column.
For lower-risk integrations such as mobile widgets,
--status-jsonemits only aggregate health/quota fields and omits local paths, prompts, chat text, session identifiers, tool arguments, child commands, and project names.Validation
cargo checkcargo test rate_limit_spendcargo test quota_cargo test status_summarycargo test readme_documents_json_snapshot_privacy_surfacecargo test test_parse_codexcargo test codex_non_1m_context_window_does_not_show_1m_suffixcargo run -- --demo --status-jsonNote: a full
cargo testrun on this Windows checkout still has unrelated existing collector test failures around temp/process/file ownership behavior; the new quota, UI, status summary, and Codex parser tests pass.