openai/codex · error
features.token_budget.reminder_threshold_tokens must be posi
Error message
features.token_budget.reminder_threshold_tokens must be positive
What it means
Error "features.token_budget.reminder_threshold_tokens must be positive" thrown in openai/codex.
Source
Thrown at codex-rs/core/src/config/mod.rs:1133
const AUTO_COMPACT_FALLBACK_PROMPT_MAX_BYTES: usize = 2000;
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct TokenBudgetConfig {
pub use_history_notes_extension: bool,
pub reminder_threshold_tokens: Option<i64>,
pub reminder_message_template: String,
pub guidance_message: Option<String>,
pub auto_compact_fallback_prompt: Option<String>,
pub auto_compact_fallback_buffer_tokens: Option<i64>,
}
impl TokenBudgetConfig {
pub(crate) fn validate(&self) -> std::io::Result<()> {
if self
.reminder_threshold_tokens
.is_some_and(|tokens| tokens <= 0)
{
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
"features.token_budget.reminder_threshold_tokens must be positive",
));
}
if self.reminder_message_template.trim().is_empty() {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
"features.token_budget.reminder_message_template must not be empty",
));
}
if self.reminder_message_template.len() > TOKEN_BUDGET_REMINDER_MESSAGE_TEMPLATE_MAX_BYTES {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!(
"features.token_budget.reminder_message_template must not exceed {TOKEN_BUDGET_REMINDER_MESSAGE_TEMPLATE_MAX_BYTES} bytes"
),
));View on GitHub (pinned to 339751715c)
Solutions
- Set features.token_budget.reminder_threshold_tokens to a positive integer.
When it happens
Trigger: Thrown at codex-rs/core/src/config/mod.rs:1133 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/cca44e4dc2e5056d.
Report an issue: GitHub.