{"record":{"id":"679b869e010664d8","repo":"openai/codex","slug":"permission-profile-and-default-permissions-ove","errorCode":null,"errorMessage":"`permission_profile` and `default_permissions` overrides cannot both be set","messagePattern":"`permission_profile` and `default_permissions` overrides cannot both be set","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/mod.rs","lineNumber":3252,"sourceCode":"                \"`--dangerously-bypass-hook-trust` is enabled. Enabled hooks may run without review for this invocation.\"\n                    .to_string(),\n            );\n        }\n\n        if sandbox_mode.is_some() && permission_profile.is_some() {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"`sandbox_mode` and `permission_profile` overrides cannot both be set\",\n            ));\n        }\n        if sandbox_mode.is_some() && default_permissions_override.is_some() {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"`sandbox_mode` and `default_permissions` overrides cannot both be set\",\n            ));\n        }\n        if permission_profile.is_some() && default_permissions_override.is_some() {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                \"`permission_profile` and `default_permissions` overrides cannot both be set\",\n            ));\n        }\n        if let Some(profile) = cfg.profile.as_deref() {\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidData,\n                format!(\n                    \"legacy `profile = \\\"{profile}\\\"` config is no longer supported; use `--profile {profile}` with `{profile}.config.toml` instead\"\n                ),\n            ));\n        }\n\n        let tool_suggest = resolve_tool_suggest_config(&cfg, &config_layer_stack);\n        let feature_overrides = FeatureOverrides {\n            web_search_request: override_tools_web_search_request,\n        };\n","sourceCodeStart":3234,"sourceCodeEnd":3270,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/mod.rs#L3234-L3270","documentation":"Error \"`permission_profile` and `default_permissions` overrides cannot both be set\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/mod.rs:3252 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set only one of `permission_profile` or `default_permissions`."],"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"}