{"record":{"id":"01545868f37fd116","repo":"openai/codex","slug":"lookupaccountnamew-failed-for-name-err-015458","errorCode":null,"errorMessage":"LookupAccountNameW failed for {name}: {err}","messagePattern":"LookupAccountNameW failed for (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/winutil.rs","lineNumber":164,"sourceCode":"                name_w.as_ptr(),\n                sid_buffer.as_mut_ptr() as *mut std::ffi::c_void,\n                &mut sid_len,\n                domain.as_mut_ptr(),\n                &mut domain_len,\n                &mut use_type,\n            )\n        };\n        if ok != 0 {\n            sid_buffer.truncate(sid_len as usize);\n            return Ok(sid_buffer);\n        }\n        let err = unsafe { GetLastError() };\n        if err == ERROR_INSUFFICIENT_BUFFER {\n            sid_buffer.resize(sid_len as usize, 0);\n            domain.resize(domain_len as usize, 0);\n            continue;\n        }\n        return Err(anyhow::anyhow!(\n            \"LookupAccountNameW failed for {name}: {err}\"\n        ));\n    }\n}\n\nfn well_known_sid_str(name: &str) -> Option<&'static str> {\n    match name {\n        \"Administrators\" => Some(SID_ADMINISTRATORS),\n        \"Users\" => Some(SID_USERS),\n        \"Authenticated Users\" => Some(SID_AUTHENTICATED_USERS),\n        \"Everyone\" => Some(SID_EVERYONE),\n        \"SYSTEM\" => Some(SID_SYSTEM),\n        _ => None,\n    }\n}\n\nfn sid_bytes_from_string(sid_str: &str) -> Result<Vec<u8>> {\n    let sid_w = to_wide(OsStr::new(sid_str));","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/winutil.rs#L146-L182","documentation":"Error \"LookupAccountNameW failed for {name}: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/winutil.rs:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the account name exists on this machine or domain and is spelled correctly; check the inner Win32 error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}