{"record":{"id":"f43cc93190287da2","repo":"openai/codex","slug":"missing-required-command-cwd-flag","errorCode":null,"errorMessage":"missing required {COMMAND_CWD_FLAG}","messagePattern":"missing required (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/wrapper.rs","lineNumber":293,"sourceCode":"                write_roots_override =\n                    Some(json_flag_value(next_flag_value(&mut args, &arg)?, &arg)?);\n            }\n            \"--\" => {\n                command = Some(args.collect::<Vec<_>>());\n                break;\n            }\n            _ => bail!(\"unexpected windows sandbox wrapper argument: {arg}\"),\n        }\n    }\n\n    let codex_home = codex_home.ok_or_else(|| anyhow!(\"missing required {CODEX_HOME_FLAG}\"))?;\n    if !codex_home.is_absolute() {\n        bail!(\n            \"{CODEX_HOME_FLAG} must be absolute: {}\",\n            codex_home.display()\n        );\n    }\n    let command_cwd = command_cwd.ok_or_else(|| anyhow!(\"missing required {COMMAND_CWD_FLAG}\"))?;\n    if workspace_roots.is_empty() {\n        workspace_roots.push(command_cwd.clone());\n    }\n    Ok(WindowsSandboxWrapperRequest {\n        codex_home,\n        command_cwd,\n        workspace_roots,\n        env_map: env_map.ok_or_else(|| anyhow!(\"missing required {ENV_JSON_FLAG}\"))?,\n        permission_profile: permission_profile\n            .ok_or_else(|| anyhow!(\"missing required {PERMISSION_PROFILE_FLAG}\"))?,\n        windows_sandbox_level: windows_sandbox_level\n            .ok_or_else(|| anyhow!(\"missing required {SANDBOX_LEVEL_FLAG}\"))?,\n        windows_sandbox_private_desktop,\n        proxy_enforced,\n        network_proxy_restricting_sid,\n        proxy_settings_mode,\n        read_roots_override,\n        read_roots_include_platform_defaults,","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/wrapper.rs#L275-L311","documentation":"Error \"missing required {COMMAND_CWD_FLAG}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/wrapper.rs:293 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the required command-cwd flag with the working directory for the sandboxed command."],"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"}