{"record":{"id":"594b23b400ac8c06","repo":"openai/codex","slug":"codex-sandbox-setup-currently-requires-elevate","errorCode":null,"errorMessage":"`codex sandbox setup` currently requires --elevated","messagePattern":"`codex sandbox setup` currently requires --elevated","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/cli/src/sandbox_setup.rs","lineNumber":56,"sourceCode":"    )]\n    current_user: bool,\n\n    /// CODEX_HOME for the Codex user. Required with --user.\n    #[arg(long = \"codex-home\", value_name = \"DIR\")]\n    codex_home: Option<PathBuf>,\n}\n\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\nenum SandboxSetupLevel {\n    Elevated,\n}\n\nimpl SandboxSetupCommand {\n    fn setup_level(&self) -> anyhow::Result<SandboxSetupLevel> {\n        if self.elevated_sandbox_level {\n            Ok(SandboxSetupLevel::Elevated)\n        } else {\n            anyhow::bail!(\"`codex sandbox setup` currently requires --elevated\");\n        }\n    }\n}\n\npub(crate) async fn run(\n    cmd: SandboxSetupCommand,\n    config_profile: Option<ProfileV2Name>,\n    cli_overrides: Vec<(String, TomlValue)>,\n) -> anyhow::Result<()> {\n    match cmd.setup_level()? {\n        SandboxSetupLevel::Elevated => run_elevated(cmd, config_profile, cli_overrides).await,\n    }\n}\n\npub(crate) fn parse_setup_command(\n    sandbox_command: &[String],\n) -> anyhow::Result<Option<SandboxSetupCommand>> {\n    if sandbox_command","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/cli/src/sandbox_setup.rs#L38-L74","documentation":"Error \"`codex sandbox setup` currently requires --elevated\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/cli/src/sandbox_setup.rs:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}