openai/codex · error · RequirementsExecPolicyParseError
rules prefix_rule at index {rule_index} has an empty justifi
Error message
rules prefix_rule at index {rule_index} has an empty justification What it means
Error "rules prefix_rule at index {rule_index} has an empty justification" thrown in openai/codex.
Source
Thrown at codex-rs/config/src/requirements_exec_policy.rs:75
#[derive(Debug, Error)]
pub enum RequirementsExecPolicyParseError {
#[error("rules prefix_rules cannot be empty")]
EmptyPrefixRules,
#[error("rules prefix_rule at index {rule_index} has an empty pattern")]
EmptyPattern { rule_index: usize },
#[error(
"rules prefix_rule at index {rule_index} has an invalid pattern token at index {token_index}: {reason}"
)]
InvalidPatternToken {
rule_index: usize,
token_index: usize,
reason: String,
},
#[error("rules prefix_rule at index {rule_index} has an empty justification")]
EmptyJustification { rule_index: usize },
#[error("rules prefix_rule at index {rule_index} is missing a decision")]
MissingDecision { rule_index: usize },
#[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')"
)]
AllowDecisionNotAllowed { rule_index: usize },
}
impl RequirementsExecPolicyToml {
/// Convert requirements TOML rules into the internal `.rules`
/// representation used by `codex-execpolicy`.
pub fn to_policy(&self) -> Result<Policy, RequirementsExecPolicyParseError> {
if self.prefix_rules.is_empty() {
return Err(RequirementsExecPolicyParseError::EmptyPrefixRules);
}View on GitHub (pinned to 339751715c)
Solutions
- Provide a non-empty justification for the prefix_rule at the reported index.
When it happens
Trigger: Thrown at codex-rs/config/src/requirements_exec_policy.rs:75 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/1da0aa9afea79f23.
Report an issue: GitHub.