{"record":{"id":"d91375d530efc8e4","repo":"openai/codex","slug":"rules-prefix-rule-at-index-rule-index-has-decisi","errorCode":null,"errorMessage":"rules prefix_rule at index {rule_index} has decision 'allow', which is not permitted in requirements.toml: Codex merges these rules with other config and uses the most restrictive result (use 'prompt' or 'forbidden')","messagePattern":"rules prefix_rule at index (.+?) has decision 'allow', which is not permitted in requirements\\.toml: Codex merges these rules with other config and uses the most restrictive result \\(use 'prompt' or 'forbidden'\\)","errorType":"validation","errorClass":"RequirementsExecPolicyParseError","httpStatus":null,"severity":"error","filePath":"codex-rs/config/src/requirements_exec_policy.rs","lineNumber":81,"sourceCode":"    #[error(\"rules prefix_rule at index {rule_index} has an empty pattern\")]\n    EmptyPattern { rule_index: usize },\n\n    #[error(\n        \"rules prefix_rule at index {rule_index} has an invalid pattern token at index {token_index}: {reason}\"\n    )]\n    InvalidPatternToken {\n        rule_index: usize,\n        token_index: usize,\n        reason: String,\n    },\n\n    #[error(\"rules prefix_rule at index {rule_index} has an empty justification\")]\n    EmptyJustification { rule_index: usize },\n\n    #[error(\"rules prefix_rule at index {rule_index} is missing a decision\")]\n    MissingDecision { rule_index: usize },\n\n    #[error(\n        \"rules prefix_rule at index {rule_index} has decision 'allow', which is not permitted in requirements.toml: Codex merges these rules with other config and uses the most restrictive result (use 'prompt' or 'forbidden')\"\n    )]\n    AllowDecisionNotAllowed { rule_index: usize },\n}\n\nimpl RequirementsExecPolicyToml {\n    /// Convert requirements TOML rules into the internal `.rules`\n    /// representation used by `codex-execpolicy`.\n    pub fn to_policy(&self) -> Result<Policy, RequirementsExecPolicyParseError> {\n        if self.prefix_rules.is_empty() {\n            return Err(RequirementsExecPolicyParseError::EmptyPrefixRules);\n        }\n\n        let mut rules_by_program: MultiMap<String, RuleRef> = MultiMap::new();\n\n        for (rule_index, rule) in self.prefix_rules.iter().enumerate() {\n            if let Some(justification) = &rule.justification\n                && justification.trim().is_empty()","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/config/src/requirements_exec_policy.rs#L63-L99","documentation":"Error \"rules prefix_rule at index {rule_index} has decision 'allow', which is not permitted in requirements.toml: Codex merges these rules with other config and uses the most restrictive result (use 'prompt' or 'forbidden')\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/config/src/requirements_exec_policy.rs:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the rule's decision from 'allow' to 'prompt' or 'forbidden' in requirements.toml."],"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"}