{"record":{"id":"cb52691c7aed7cf7","repo":"openai/codex","slug":"rules-prefix-rule-at-index-rule-index-has-an-inv","errorCode":null,"errorMessage":"rules prefix_rule at index {rule_index} has an invalid pattern token at index {token_index}: {reason}","messagePattern":"rules prefix_rule at index (.+?) has an invalid pattern token at index (.+?): (.+?)","errorType":"validation","errorClass":"RequirementsExecPolicyParseError","httpStatus":null,"severity":"error","filePath":"codex-rs/config/src/requirements_exec_policy.rs","lineNumber":66,"sourceCode":"impl RequirementsExecPolicyDecisionToml {\n    fn as_decision(self) -> Decision {\n        match self {\n            Self::Allow => Decision::Allow,\n            Self::Prompt => Decision::Prompt,\n            Self::Forbidden => Decision::Forbidden,\n        }\n    }\n}\n\n#[derive(Debug, Error)]\npub enum RequirementsExecPolicyParseError {\n    #[error(\"rules prefix_rules cannot be empty\")]\n    EmptyPrefixRules,\n\n    #[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 },","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/config/src/requirements_exec_policy.rs#L48-L84","documentation":"Error \"rules prefix_rule at index {rule_index} has an invalid pattern token at index {token_index}: {reason}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/config/src/requirements_exec_policy.rs:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the invalid pattern token at the reported index per the given reason."],"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"}