openai/codex · error · std::io::Error
goals.max_goal_token_budget exceeds the maximum supported to
Error message
goals.max_goal_token_budget exceeds the maximum supported token budget
What it means
Error "goals.max_goal_token_budget exceeds the maximum supported token budget" thrown in openai/codex.
Source
Thrown at codex-rs/core/src/config/mod.rs:4190
} else {
Some(trimmed.to_string())
}
})
.collect(),
tool_output_token_limit: cfg.tool_output_token_limit,
agents_enabled,
agent_max_threads,
agent_default_subagent_model,
agent_default_subagent_reasoning_effort,
agent_max_depth,
agent_roles,
max_goal_token_budget: cfg
.goals
.as_ref()
.and_then(|goals| goals.max_goal_token_budget)
.map(|max_goal_token_budget| {
i64::try_from(max_goal_token_budget.get()).map_err(|_| {
std::io::Error::new(
std::io::ErrorKind::InvalidInput,
"goals.max_goal_token_budget exceeds the maximum supported token budget",
)
})
})
.transpose()?,
memories: memories_config,
agent_interrupt_message_enabled,
codex_home,
sqlite: codex_state::SqliteConfig::from_sqlite_home(sqlite_home),
log_dir,
config_layer_stack,
history,
ephemeral: ephemeral.unwrap_or_default(),
extra_config: None,
bypass_hook_trust,
file_opener: cfg.file_opener.unwrap_or(UriBasedFileOpener::VsCode),
codex_self_exe,View on GitHub (pinned to 339751715c)
Solutions
- Lower goals.max_goal_token_budget to the maximum supported value.
When it happens
Trigger: Thrown at codex-rs/core/src/config/mod.rs:4190 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/ced3d75643d62bd4.
Report an issue: GitHub.