{"record":{"id":"474b46c836fd2018","repo":"openai/codex","slug":"requirements-toml-default-permissions-default-pe","errorCode":null,"errorMessage":"requirements.toml default_permissions `{default_permissions}` must be allowed by allowed_permission_profiles","messagePattern":"requirements\\.toml default_permissions `(.+?)` must be allowed by allowed_permission_profiles","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/mod.rs","lineNumber":4665,"sourceCode":"                format!(\n                    \"requirements.toml allowed_permission_profiles refers to undefined profile `{profile_id}`\"\n                ),\n            ));\n        }\n    }\n\n    let Some(default_permissions) = requirements_toml\n        .default_permissions\n        .as_deref()\n        .or_else(|| implicit_default_permissions(allowed_permission_profiles))\n    else {\n        return Err(std::io::Error::new(\n            ErrorKind::InvalidInput,\n            \"requirements.toml default_permissions must be set unless allowed_permission_profiles allows both `:workspace` and `:read-only`\",\n        ));\n    };\n    if !is_permission_allowed(allowed_permission_profiles, default_permissions) {\n        return Err(std::io::Error::new(\n            ErrorKind::InvalidInput,\n            format!(\n                \"requirements.toml default_permissions `{default_permissions}` must be allowed by allowed_permission_profiles\"\n            ),\n        ));\n    }\n\n    Ok(())\n}\n\nfn implicit_default_permissions(\n    allowed_permission_profiles: &BTreeMap<String, bool>,\n) -> Option<&'static str> {\n    (is_permission_allowed(allowed_permission_profiles, BUILT_IN_WORKSPACE_PROFILE)\n        && is_permission_allowed(allowed_permission_profiles, BUILT_IN_READ_ONLY_PROFILE))\n    .then_some(BUILT_IN_WORKSPACE_PROFILE)\n}\n","sourceCodeStart":4647,"sourceCodeEnd":4683,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/mod.rs#L4647-L4683","documentation":"Error \"requirements.toml default_permissions `{default_permissions}` must be allowed by allowed_permission_profiles\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/mod.rs:4665 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the default_permissions value in allowed_permission_profiles."],"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"}