{"record":{"id":"2313501311a4ecef","repo":"openai/codex","slug":"sandbox-mode-and-permission-profile-overrides","errorCode":null,"errorMessage":"`sandbox_mode` and `permission_profile` overrides cannot both be set","messagePattern":"`sandbox_mode` and `permission_profile` overrides cannot both be set","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/mod.rs","lineNumber":3240,"sourceCode":"            compact_prompt,\n            show_raw_agent_reasoning,\n            tools_web_search_request: override_tools_web_search_request,\n            ephemeral,\n            bypass_hook_trust,\n            additional_writable_roots,\n            workspace_roots: workspace_roots_override,\n        } = overrides;\n        let bypass_hook_trust = bypass_hook_trust.unwrap_or_default();\n\n        if bypass_hook_trust {\n            startup_warnings.push(\n                \"`--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(","sourceCodeStart":3222,"sourceCodeEnd":3258,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/mod.rs#L3222-L3258","documentation":"Error \"`sandbox_mode` and `permission_profile` overrides cannot both be set\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/mod.rs:3240 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set only one of `sandbox_mode` or `permission_profile`."],"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"}