{"record":{"id":"cca44e4dc2e5056d","repo":"openai/codex","slug":"features-token-budget-reminder-threshold-tokens-mu","errorCode":null,"errorMessage":"features.token_budget.reminder_threshold_tokens must be positive","messagePattern":"features\\.token_budget\\.reminder_threshold_tokens must be positive","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/mod.rs","lineNumber":1133,"sourceCode":"const AUTO_COMPACT_FALLBACK_PROMPT_MAX_BYTES: usize = 2000;\n\n#[derive(Debug, Clone, PartialEq, Eq, Serialize)]\npub struct TokenBudgetConfig {\n    pub use_history_notes_extension: bool,\n    pub reminder_threshold_tokens: Option<i64>,\n    pub reminder_message_template: String,\n    pub guidance_message: Option<String>,\n    pub auto_compact_fallback_prompt: Option<String>,\n    pub auto_compact_fallback_buffer_tokens: Option<i64>,\n}\n\nimpl TokenBudgetConfig {\n    pub(crate) fn validate(&self) -> std::io::Result<()> {\n        if self\n            .reminder_threshold_tokens\n            .is_some_and(|tokens| tokens <= 0)\n        {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"features.token_budget.reminder_threshold_tokens must be positive\",\n            ));\n        }\n\n        if self.reminder_message_template.trim().is_empty() {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"features.token_budget.reminder_message_template must not be empty\",\n            ));\n        }\n        if self.reminder_message_template.len() > TOKEN_BUDGET_REMINDER_MESSAGE_TEMPLATE_MAX_BYTES {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                format!(\n                    \"features.token_budget.reminder_message_template must not exceed {TOKEN_BUDGET_REMINDER_MESSAGE_TEMPLATE_MAX_BYTES} bytes\"\n                ),\n            ));","sourceCodeStart":1115,"sourceCodeEnd":1151,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/mod.rs#L1115-L1151","documentation":"Error \"features.token_budget.reminder_threshold_tokens must be positive\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/mod.rs:1133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set features.token_budget.reminder_threshold_tokens to a positive integer."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}