Repository navigation
feat(codex): opt in to using remaining included quota - #6629
Draft
Yuxin-Qiao wants to merge 1 commit into
Draft
Yuxin-Qiao wants to merge 1 commit into
Yuxin-Qiao wants to merge 1 commit into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Contributor
⏳ DRAFT
What to do
Review readiness checklist
1/4 boxes ticked. This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. |
8 tasks done
This branch has not been deployed
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
An explicitly selected Codex account can still be switched away or refused at a proactive quota threshold while included quota remains. Turning off auto-switch alone does not remove the main-account hard lock. This adds a persistent, default-off preference for using an individual account's remaining included quota.
ocx account use-remaining openai <id|alias|main> <on|off|status> [--json]and authenticated GET/PUT/api/codex-auth/accounts/use-remainingroutes.Example after enabling the preference:
This control is exposed through the CLI and API. Explicit maintainer security review is pending for the account policy and management authentication boundary.
Verification
Validated locally against head
2a7add53ca, based ondevat0511f458f1:bun run typecheck— passed.bun test tests/codex-integration/codex-use-remaining-quota.test.ts tests/cli/cli-account-policy.test.ts tests/ci-workflows/file-size-ratchet.test.ts— 114 passed, 0 failed. Includes 95%/99.9% admission, 100% refusal, pause/429 cooldown, persistence, rollback, management credential checks, malformed configuration, and restoration of saved thresholds.bun test tests/server/management-route-registry.test.ts tests/cli/cli-capability-account-workflows.test.ts— 38 passed, 0 failed.bun run privacy:scan,bun run structure:check,bun run skill:surface:check, andgit diff --check— passed.cd docs-site && bun install --frozen-lockfile && bun run build— passed, including internal-link validation.bun run test— not passed: the parallel lane was terminated by the repository's 900-second watchdog (exit 124), with failures before termination and incomplete full-suite coverage. On an unchanged0511f458f1baseline, the Anthropic Fast management test also fails (7 passed/1 failed), and provider management validation has 118 passed/19 failed. These reproduce specific baseline failures; other full-run failures and timeouts have not all been independently classified.Regression evidence uses isolated fixtures. No real-account quota consumption or production runtime activation was performed. No remote CI result or approval is claimed.
Checklist
Review readiness
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.