{"record":{"id":"9b5cc54a59bb8463","repo":"openai/codex","slug":"features-rollout-budget-limit-tokens-is-required-w","errorCode":null,"errorMessage":"features.rollout_budget.limit_tokens is required when rollout_budget is enabled","messagePattern":"features\\.rollout_budget\\.limit_tokens is required when rollout_budget is enabled","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/mod.rs","lineNumber":2791,"sourceCode":"        reminder_threshold_tokens,\n        reminder_message_template,\n        guidance_message,\n        auto_compact_fallback_prompt,\n        auto_compact_fallback_buffer_tokens,\n    };\n    token_budget.validate()?;\n    Ok(Some(token_budget))\n}\n\nfn resolve_rollout_budget_config(\n    config_toml: &ConfigToml,\n    features: &ManagedFeatures,\n) -> std::io::Result<Option<RolloutBudgetConfig>> {\n    if !features.enabled(Feature::RolloutBudget) {\n        return Ok(None);\n    }\n    let missing_limit_error = || {\n        std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            \"features.rollout_budget.limit_tokens is required when rollout_budget is enabled\",\n        )\n    };\n    let Some(FeatureToml::Config(config)) = config_toml\n        .features\n        .as_ref()\n        .and_then(|features| features.rollout_budget.as_ref())\n    else {\n        return Err(missing_limit_error());\n    };\n    let Some(limit_tokens) = config.limit_tokens else {\n        return Err(missing_limit_error());\n    };\n    if limit_tokens <= 0 {\n        return Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            \"features.rollout_budget.limit_tokens must be positive\",","sourceCodeStart":2773,"sourceCodeEnd":2809,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/mod.rs#L2773-L2809","documentation":"Error \"features.rollout_budget.limit_tokens is required when rollout_budget is enabled\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/mod.rs:2791 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set features.rollout_budget.limit_tokens when rollout_budget is enabled."],"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"}