openai/codex · error · ExecPolicyError
failed to parse rules file {path}: {source}
Error message
failed to parse rules file {path}: {source} What it means
Error "failed to parse rules file {path}: {source}" thrown in openai/codex.
Source
Thrown at codex-rs/core/src/exec_policy.rs:252
}
}
}
#[derive(Debug, Error)]
pub enum ExecPolicyError {
#[error("failed to read rules files from {dir}: {source}")]
ReadDir {
dir: PathBuf,
source: std::io::Error,
},
#[error("failed to read rules file {path}: {source}")]
ReadFile {
path: PathBuf,
source: std::io::Error,
},
#[error("failed to parse rules file {path}: {source}")]
ParsePolicy {
path: String,
source: codex_execpolicy::Error,
},
}
#[derive(Debug, Error)]
pub enum ExecPolicyUpdateError {
#[error("failed to update rules file {path}: {source}")]
AppendRule { path: PathBuf, source: AmendError },
#[error("failed to join blocking rules update task: {source}")]
JoinBlockingTask { source: tokio::task::JoinError },
#[error("failed to update in-memory rules: {source}")]
AddRule {
#[from]
source: ExecPolicyRuleError,View on GitHub (pinned to 339751715c)
Solutions
- Fix the syntax of the rules file {path} per the underlying parse error.
When it happens
Trigger: Thrown at codex-rs/core/src/exec_policy.rs:252 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/a5af8bc166a5c50d.
Report an issue: GitHub.