Repository navigation
Closed
Labels
CLIIssues related to the Codex CLIbugSomething isn't workingrate-limitsIssues related to rate limits, quotas, and token usage reporting
Description
What version of Codex CLI is running?
codex-cli 0.133.0
What subscription do you have?
Pro 20x
Which model were you using?
gpt-5.5 xhigh
What platform is your computer?
Darwin 24.4.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Codex App terminal
Codex doctor report
• codex doctor --json exited 1.
Key result: overallStatus: "fail" on codexVersion: "0.133.0".
Main failures/warnings:
- network.provider_reachability: fail
https://chatgpt.com/backend-api/ connect failed (required)
- network.websocket_reachability: warning
DNS lookup failed for wss://chatgpt.com/backend-api/<redacted>
- mcp.config: warning
Optional local MCP servers unreachable: vault, email, money, notes, code, trade on localhost ports 8089-8094.
- updates.status: warning
Latest version probe failed: curl: (6) Could not resolve host: api.github.com.
Everything else important looked okay: auth configured, config loads, install consistent, state DB integrity ok, sandbox readable.What issue are you seeing?
Title
/goal can inherit a self-imposed token budget even when user did not request one
Summary
During an Orion work session, Codex created an internal goal with a token budget that the user never requested. When that budget was reached, the system marked the goal budget_limited and
instructed the agent to stop substantive work.
This caused Codex to prematurely halt a long-running implementation task even though the user’s /goal prompt did not specify any token or time budget.
What Happened
User started a goal with:
Make Orion materially better as a message-first investment research agent...
No token budget was specified.
The assistant then called create_goal with:
{
"objective": "...",
"token_budget": 180000
}
Later, the thread received goal context saying:
The active thread goal has reached its token budget.
Tokens used: 180402
Token budget: 180000
The assistant stopped work and summarized partial progress.
## Expected Behavior
Codex should not set a goal token budget unless the user explicitly requests one.
For open-ended /goal tasks, the goal should remain active until one of these happens:
- the objective is completed
- the user pauses/stops/cancels it
- the agent is genuinely blocked
- the system has a non-user-configurable hard limit, clearly labeled as such
## Actual Behavior
The assistant introduced a hidden/self-imposed token_budget value, which then became binding system behavior and interrupted the task.
## Impact
This is especially harmful for large implementation goals because:
- the user did not opt into the budget
- the assistant may stop before making code changes
- the user cannot easily tell whether the limit came from their prompt, repo config, or Codex internals
- it makes /goal feel unreliable for long-running engineering work
## Suggested Fix
1. Do not allow agents to set token_budget in create_goal unless the user explicitly requested a token budget.
2. Add validation or linting around create_goal calls:
- if token_budget is present, require evidence of a user-specified budget
3. Make budget source visible in goal context:
- budget_source: user_explicit | system_default | assistant_inferred
4. Provide a way for the user to clear or extend an accidental budget.
5. Consider warning the assistant before creating a budgeted goal:
- “The user did not request a token budget. Omit token_budget?”
## Environment
- Codex CLI: 0.133.0
- Auth mode: ChatGPT
- Goal feature enabled
### What steps can reproduce the bug?
Uploaded thread: 019e6572-a1ef-79a1-bbfe-46bcd4582484
### What is the expected behavior?
Codex should not set a goal token budget unless the user explicitly requests one.
For open-ended /goal tasks, the goal should remain active until one of these happens:
- the objective is completed
- the user pauses/stops/cancels it
- the agent is genuinely blocked
- the system has a non-user-configurable hard limit, clearly labeled as such
### Additional information
_No response_Metadata
Metadata
Assignees
Labels
CLIIssues related to the Codex CLIbugSomething isn't workingrate-limitsIssues related to rate limits, quotas, and token usage reporting
Activity
etraut-openai commentedon May 27, 2026
Thanks for reporting this. It looks like you declined to upload your session details and logs. Without that information, there's not much I can do to investigate this problem. If you see it again, please use
/feedbackand upload logs and session details. Or if you happen to have this session around still, you could resume it and run/feedbackagain.If you are unable to share the full session details, perhaps you still have the original prompt that you used to create the goal? I presume you didn't use
/goalbecause that uses an API to set the goal, and it never supplies a token budget. The only way to set a token budget is to ask the agent itself to create a goal for itself.patrick-kimm commentedon May 27, 2026
Hi Eric, thank you for the quick reply!
I did use
/goal. I did not ask the agent to create a goal for itself separately, and I did not specify any token budget.Original prompt started with:
etraut-openai commentedon Jun 8, 2026
We've strengthened the prompt. The agent is now explicitly told not to ever use a token budget unless specifically requested by the user.
bitnom commentedon Sep 19, 2026
this is rly annoying. you're leaving it in the context instead of a transient message, causing the agent to keep going idle. the goal was already cleared long before that exchange