openai/codex · error · anyhow::Error
Windows sandbox setup is missing or out of date; rerun the…
Error message
Windows sandbox setup is missing or out of date; rerun the sandbox setup with elevation
What it means
Post-refresh validation determined the installed Windows sandbox state (users, ACLs, helper binaries) is missing or stale even after attempting an elevated setup refresh, so the sandbox cannot be used until setup is rerun with administrator rights.
Solutions
- Rerun the Windows sandbox setup from an elevated (administrator) Codex session
- Clear the stale sandbox state under codex_home before rerunning setup
- Verify the elevation prompt was accepted and the setup completed without errors
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/identity.rs:249 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/e8d7d61f39eba0ae.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/windows-sandbox-rs/src/identity.rs:249
run_setup_refresh_with_overrides_and_proxy_settings(
crate::setup::SandboxSetupRequest {
permissions,
command_cwd,
env_map,
codex_home,
proxy_enforced,
},
crate::setup::SetupRootOverrides {
read_roots: Some(needed_read),
read_roots_include_platform_defaults,
write_roots: Some(needed_write),
deny_read_paths: Some(deny_read_paths_override.to_vec()),
deny_write_paths: Some(deny_write_paths_override.to_vec()),
},
&desired_offline_proxy_settings,
)?;
let identity = identity.ok_or_else(|| {
anyhow!(
"Windows sandbox setup is missing or out of date; rerun the sandbox setup with elevation"
)
})?;
Ok(SandboxCreds {
username: identity.username,
password: identity.password,
})
}
fn desired_offline_proxy_settings(
marker: Option<&SetupMarker>,
proxy_settings_mode: crate::WindowsSandboxProxySettingsMode,
env_map: &HashMap<String, String>,
network_identity: SandboxNetworkIdentity,
) -> crate::setup::OfflineProxySettings {
match (marker, proxy_settings_mode) {
(Some(marker), crate::WindowsSandboxProxySettingsMode::Preserve)
if marker.version_matches() =>View on GitHub (pinned to 339751715c)