Codex self-imposed token budget on a /goal
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:
```json
{
"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
- Do not allow agents to set token_budget in create_goal unless the user explicitly requested a token budget.
- Add validation or linting around create_goal calls:
- if token_budget is present, require evidence of a user-specified budget
- Make budget source visible in goal context:
- budget_source: user_explicit | system_default | assistant_inferred
- Provide a way for the user to clear or extend an accidental budget.
- 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_
3 Comments
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.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:
```text
/goal Make Orion materially better as a message-first investment research agent, with special focus on multi-turn conversational state, native chat tone, chart UX, and live tool correctness.
The prompt then listed files to read, failure cases to fix, eval requirements, and verification commands. There was no token budget or time budget in the prompt.
Thread id:
019e6572-a1ef-79a1-bbfe-46bcd4582484
What I observed is that the assistant/tool layer created the goal with this payload:
{
"objective": "Make Orion materially better as a message-first investment research agent, focusing on multi-turn conversational state, native chat tone, chart UX, and live tool correctness, with
required regressions, verification, transcript inspection, and docs lessons.",
"token_budget": 180000
}
Then later the system injected:
The active thread goal has reached its token budget.
Budget:
The system has marked the goal as budget_limited, so do not start new substantive work for this goal.
So the issue may be that in this environment /goal was not handled purely by the slash-command API path you described, or the model still had access to create_goal and supplied a token_budget on its own.
We've strengthened the prompt. The agent is now explicitly told not to ever use a token budget unless specifically requested by the user.