openai/codex · error · RequirementsExecPolicyParseError

rules prefix_rules cannot be empty

Error message

rules prefix_rules cannot be empty

What it means

Error "rules prefix_rules cannot be empty" thrown in openai/codex.

Source

Thrown at codex-rs/config/src/requirements_exec_policy.rs:60

pub enum RequirementsExecPolicyDecisionToml {
    Allow,
    Prompt,
    Forbidden,
}

impl RequirementsExecPolicyDecisionToml {
    fn as_decision(self) -> Decision {
        match self {
            Self::Allow => Decision::Allow,
            Self::Prompt => Decision::Prompt,
            Self::Forbidden => Decision::Forbidden,
        }
    }
}

#[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")]

View on GitHub (pinned to 339751715c)

Solutions

  1. Remove the empty `prefix_rules` entry or add at least one rule to it.

When it happens

Trigger: Thrown at codex-rs/config/src/requirements_exec_policy.rs:60 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/2db1ed2c70ec90bc. Report an issue: GitHub.