openai/codex · error · SetupFailure
HelperSetupMarkerWriteFailed
HelperSetupMarkerWriteFailed
Error message
remove setup marker file {} failed: {err} What it means
Removing the in-progress setup marker file failed with an io error. The marker is deleted after the read-ACL refresh completes so a later readiness check does not see a half-finished state; leaving it behind keeps setup looking in-progress, so the error is surfaced rather than ignored.
Solutions
- Check the io::Error in the message: permission denied usually means the marker's protected ACL blocks deletion by the current identity
- Run the cleanup/setup elevated so the marker file can be removed
- Manually delete the marker file from an administrator context and re-run setup
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/sandbox_users.rs:474 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/3b7ab91d9d5aec28.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/sandbox_users.rs:474
"write sandbox users file {} failed: {err}",
users_path.display()
),
))
})?;
Ok(())
}
// Create the final marker path with its protected ACL before provisioning begins. The empty file
// intentionally fails readiness checks while setup is in progress, and sandbox users cannot read,
// modify, or replace it. Once every setup step succeeds, `commit_setup_marker` writes the valid
// marker contents without changing the file's ACL.
pub(super) fn prepare_setup_marker(codex_home: &Path, real_user: &str) -> Result<()> {
let marker_path = sandbox_dir(codex_home).join("setup_marker.json");
match std::fs::remove_file(&marker_path) {
Ok(()) => {}
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}
Err(err) => {
return Err(anyhow::Error::new(SetupFailure::new(
SetupErrorCode::HelperSetupMarkerWriteFailed,
format!(
"remove setup marker file {} failed: {err}",
marker_path.display()
),
)));
}
}
let real_user_sid = resolve_sid(real_user)
.and_then(|sid| string_from_sid_bytes(&sid).map_err(anyhow::Error::msg))
.map_err(|err| {
anyhow::Error::new(SetupFailure::new(
SetupErrorCode::HelperSetupMarkerWriteFailed,
format!("resolve real user SID for setup marker failed: {err}"),
))
})?;
let sddl = to_wide(format!(View on GitHub (pinned to 339751715c)