openai/codex · error · anyhow::Error

sandbox provisioning succeeded, but failed to persist elevat

Error message

sandbox provisioning succeeded, but failed to persist elevated sandbox config: {err}

What it means

Error "sandbox provisioning succeeded, but failed to persist elevated sandbox config: {err}" thrown in openai/codex.

Source

Thrown at codex-rs/cli/src/sandbox_setup.rs:114

            config_profile.as_ref(),
            &identity.codex_home,
        ))
        .cli_overrides(cli_overrides)
        .build()
        .await
        .context("failed to load target user's Codex config for sandbox provisioning")?;

    codex_core::windows_sandbox::run_elevated_provisioning_setup(
        identity.codex_home.as_path(),
        identity.real_user.as_str(),
        config.permissions.network.as_ref(),
    )?;
    ConfigEditsBuilder::new(identity.codex_home.as_path())
        .set_windows_sandbox_mode("elevated")
        .apply()
        .await
        .map_err(|err| {
            anyhow::anyhow!(
                "sandbox provisioning succeeded, but failed to persist elevated sandbox config: {err}"
            )
        })?;

    println!(
        "Windows elevated sandbox setup completed for {} at {}.",
        identity.real_user,
        identity.codex_home.display()
    );
    Ok(())
}

struct SandboxSetupIdentity {
    real_user: String,
    codex_home: PathBuf,
}

fn resolve_sandbox_setup_identity(

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/cli/src/sandbox_setup.rs:114 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/8ddb5a9a17683022. Report an issue: GitHub.