openai/codex · error
setup refresh had errors
Error message
setup refresh had errors
What it means
Sentinel aggregation error: a refresh-mode setup run completed with one or more per-step errors (detailed in the 'setup refresh completed with errors' log line listing refresh_errors), and refresh_only was set, so the run aborts instead of finishing. It marks the overall refresh as failed even though individual steps logged and continued.
Solutions
- Read the setup log to see the refresh_errors list and identify the failing steps
- Fix the underlying per-step causes (ACL failures, missing paths, SID issues)
- Re-run the refresh once the offending configuration or filesystem state is repaired
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win.rs:1032 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/e39c8647ae8716d2.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win.rs:1032
refresh_errors
),
)?;
}
if !refresh_only {
lock_persistent_sandbox_dirs(payload, &sandbox_group_sid)?;
}
unsafe {
if !sandbox_group_psid.is_null() {
LocalFree(sandbox_group_psid as HLOCAL);
}
}
if refresh_only && !refresh_errors.is_empty() {
log_line(
log,
&format!("setup refresh completed with errors: {refresh_errors:?}"),
)?;
anyhow::bail!("setup refresh had errors");
}
log_note("setup binary completed", Some(sbx_dir));
Ok(())
}
#[cfg(test)]
mod tests {
use super::Payload;
use super::SETUP_VERSION;
use super::WRITE_ROOT_ALLOW_MASK;
use super::convert_string_sid_to_sid;
use super::workspace_write_cap_sids_for_path;
use codex_otel::StatsigMetricsSettings;
use codex_windows_sandbox::ensure_allow_mask_aces;
use codex_windows_sandbox::ensure_allow_write_aces;
use codex_windows_sandbox::load_or_create_cap_sids;
use codex_windows_sandbox::path_mask_allows;
use codex_windows_sandbox::path_write_aces_need_refresh;View on GitHub (pinned to 339751715c)