openai/codex · error · anyhow::Error
LookupAccountSidW preflight failed for {sid_str}: {err}
Error message
LookupAccountSidW preflight failed for {sid_str}: {err} What it means
Error "LookupAccountSidW preflight failed for {sid_str}: {err}" thrown in openai/codex.
Source
Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/sandbox_users.rs:322
let mut use_type: SID_NAME_USE = 0;
let ok = unsafe {
LookupAccountSidW(
std::ptr::null(),
psid,
std::ptr::null_mut(),
&mut name_len,
std::ptr::null_mut(),
&mut domain_len,
&mut use_type,
)
};
if ok == 0 {
let err = unsafe { GetLastError() };
if err != ERROR_INSUFFICIENT_BUFFER {
unsafe {
LocalFree(psid as _);
}
return Err(anyhow::anyhow!(
"LookupAccountSidW preflight failed for {sid_str}: {err}"
));
}
}
let mut name_buf: Vec<u16> = vec![0u16; name_len as usize];
let mut domain_buf: Vec<u16> = vec![0u16; domain_len as usize];
let ok = unsafe {
LookupAccountSidW(
std::ptr::null(),
psid,
name_buf.as_mut_ptr(),
&mut name_len,
domain_buf.as_mut_ptr(),
&mut domain_len,
&mut use_type,
)
};
unsafe {View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win/sandbox_users.rs:322 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/6045b260bbb498ee.
Report an issue: GitHub.