openai/codex · error · SetupFailure
HelperUserCreateOrUpdateFailed
HelperUserCreateOrUpdateFailed
Error message
failed to create/update user {name}, code {status}/{upd} What it means
Both NetUserAdd (creating the sandbox user) and the fallback NetUserSetInfo level-1003 password update returned non-NERR_Success status codes. The user account for the sandbox could neither be created nor have its password corrected, so user provisioning aborts; the numeric LanMan status codes for both attempts are included in the message.
Solutions
- Decode the status codes: NERR_UserExists (2224) means the pre-existing user could not be updated, ERROR_ACCESS_DENIED (5) means the process is not elevated or lacks user-management rights
- Run the setup binary as an administrator with rights to create local users
- If the account exists in a broken state, delete the stale codex sandbox users via lusrmgr.msc or 'net user <name> /delete' and re-run setup
- Check local password policy (length/complexity) if status indicates the password was rejected
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/sandbox_users.rs:135 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/7b7249619b64187e.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/sandbox_users.rs:135
1,
&info as *const _ as *mut u8,
std::ptr::null_mut(),
);
if status != NERR_Success {
// Try update password via level 1003.
let pw_info = USER_INFO_1003 {
usri1003_password: pwd_w.as_ptr() as *mut u16,
};
let upd = NetUserSetInfo(
std::ptr::null(),
name_w.as_ptr(),
1003,
&pw_info as *const _ as *mut u8,
std::ptr::null_mut(),
);
if upd != NERR_Success {
super::log_line(log, &format!("NetUserSetInfo failed for {name} code {upd}"))?;
return Err(anyhow::Error::new(SetupFailure::new(
SetupErrorCode::HelperUserCreateOrUpdateFailed,
format!("failed to create/update user {name}, code {status}/{upd}"),
)));
}
}
// Ensure the principal is a regular local user account.
if let Ok(group_name) = lookup_account_name_for_sid(SID_USERS) {
let group = to_wide(OsStr::new(&group_name));
let member = LOCALGROUP_MEMBERS_INFO_3 {
lgrmi3_domainandname: name_w.as_ptr() as *mut u16,
};
let _ = NetLocalGroupAddMembers(
std::ptr::null(),
group.as_ptr(),
3,
&member as *const _ as *mut u8,
1,View on GitHub (pinned to 339751715c)