openai / openai/codex

Do not consume credit if limit exceeds

Open
#41,134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI model-behavior rate-limits
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

v0.149.1

What subscription do you have?

yes

Which model were you using?

gpt-5.6-sol xhigh

What platform is your computer?

Windows

What terminal emulator and version are you using (if applicable)?

No response

Codex doctor report

What issue are you seeing?

Codex was explicitly instructed: “Pause when the five-hour included usage limit is reached; do not use credits.”

Codex acknowledged this instruction, but continued running tools after the included usage limit was reached, resulting in paid credit consumption without explicit approval.

Expected behavior: Codex should automatically stop when the included-usage limit is reached and require clear user confirmation before consuming any paid credits.

Additionally, agents need reliable visibility into when the included-usage boundary has been reached. An agent should not acknowledge or promise to enforce a usage limit unless it can actually detect that limit and stop accordingly.

What steps can reproduce the bug?
  1. Start a Codex session with available included five-hour usage remaining.
  2. Explicitly instruct Codex: “Pause when the five-hour included usage limit is reached; do not use credits.”
  3. Confirm that Codex acknowledges and agrees to follow this instruction.
  4. Run a long task that uses tools until the included five-hour usage limit is exhausted.
  5. Observe that Codex continues running tools after the included usage limit is reached.
  6. Check usage/billing and confirm that paid credits were consumed without explicit approval.
  7. At no point does Codex stop and ask for confirmation before switching from included usage to paid credits.
What is the expected behavior?

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating Codex CLI's included-usage and paid-credit transition handling, then trace how the agent decides whether to continue running tools. Done means the CLI reliably detects the five-hour limit, pauses before paid-credit use, and obtains clear user confirmation before continuing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.