openai/codex · error · ConstraintError

invalid value for `{field_name}`: `{candidate}` is not in th

Error message

invalid value for `{field_name}`: `{candidate}` is not in the allowed set {allowed} (set by {requirement_source})

What it means

Error "invalid value for `{field_name}`: `{candidate}` is not in the allowed set {allowed} (set by {requirement_source})" thrown in openai/codex.

Source

Thrown at codex-rs/core/src/config/managed_features.rs:201

                    feature.key(),
                    normalized_features.enabled(*feature)
                ),
                allowed,
                requirement_source: source.clone(),
            });
        }
    }

    Ok(())
}

fn validate_pinned_features(
    normalized_features: &Features,
    pinned_features: &BTreeMap<Feature, bool>,
    source: Option<&RequirementSource>,
) -> std::io::Result<()> {
    validate_pinned_features_constraint(normalized_features, pinned_features, source)
        .map_err(|err| std::io::Error::new(std::io::ErrorKind::InvalidData, err))
}

fn feature_requirements_display(feature_requirements: &BTreeMap<Feature, bool>) -> String {
    let values = feature_requirements
        .iter()
        .map(|(feature, enabled)| format!("{}={enabled}", feature.key()))
        .collect::<Vec<_>>();
    format!("[{}]", values.join(", "))
}

fn parse_feature_requirements(
    feature_requirements: FeatureRequirementsToml,
    source: &RequirementSource,
    mut startup_warnings: Option<&mut Vec<String>>,
) -> BTreeMap<Feature, bool> {
    let mut pinned_features = BTreeMap::new();
    for (key, enabled) in feature_requirements.entries {
        if key == "auto_review" {

View on GitHub (pinned to 339751715c)

Solutions

  1. Set `{field_name}` to one of the allowed values {allowed}.

When it happens

Trigger: Thrown at codex-rs/core/src/config/managed_features.rs:201 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/1797584893b327c1. Report an issue: GitHub.