{"record":{"id":"286ab1109da7e9af","repo":"openai/codex","slug":"codex-home-is-required-with-user","errorCode":null,"errorMessage":"--codex-home is required with --user","messagePattern":"--codex-home is required with --user","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/cli/src/sandbox_setup.rs","lineNumber":158,"sourceCode":"            })?;\n        let codex_home = match cmd.codex_home.clone() {\n            Some(codex_home) => codex_home,\n            None => find_codex_home()?.to_path_buf(),\n        };\n        return Ok(SandboxSetupIdentity {\n            real_user,\n            codex_home,\n        });\n    }\n\n    let real_user = cmd\n        .user\n        .clone()\n        .ok_or_else(|| anyhow::anyhow!(\"--user or --current-user is required\"))?;\n    let codex_home = cmd\n        .codex_home\n        .clone()\n        .ok_or_else(|| anyhow::anyhow!(\"--codex-home is required with --user\"))?;\n    Ok(SandboxSetupIdentity {\n        real_user,\n        codex_home,\n    })\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn parses_managed_user_identity() {\n        let command = SandboxSetupCommand::try_parse_from([\n            \"setup\",\n            \"--elevated\",\n            \"--user\",\n            \"DOMAIN\\\\alice\",\n            \"--codex-home\",","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/cli/src/sandbox_setup.rs#L140-L176","documentation":"Error \"--codex-home is required with --user\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/cli/src/sandbox_setup.rs:158 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"}