{"record":{"id":"54d5ddaebe7145d3","repo":"openai/codex","slug":"createfilew-failed-for-pipe-name-err","errorCode":null,"errorMessage":"CreateFileW failed for pipe {name}: {err}","messagePattern":"CreateFileW failed for pipe (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/bin/command_runner/win.rs","lineNumber":146,"sourceCode":"}\n\n/// Open a named pipe created by the parent process.\nfn open_pipe(name: &str, access: u32) -> Result<HANDLE> {\n    let path = to_wide(name);\n    let handle = unsafe {\n        CreateFileW(\n            path.as_ptr(),\n            access,\n            0,\n            std::ptr::null_mut(),\n            OPEN_EXISTING,\n            0,\n            0,\n        )\n    };\n    if handle == windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE {\n        let err = unsafe { GetLastError() };\n        return Err(anyhow::anyhow!(\"CreateFileW failed for pipe {name}: {err}\"));\n    }\n    Ok(handle)\n}\n\n/// Send an error frame back to the parent process.\nfn send_error(\n    writer: &Arc<StdMutex<File>>,\n    stage: ErrorStage,\n    windows_error_code: Option<u32>,\n    message: String,\n) -> Result<()> {\n    let msg = FramedMessage {\n        version: IPC_PROTOCOL_VERSION,\n        message: Message::Error {\n            payload: ErrorPayload {\n                message,\n                stage,\n                windows_error_code,","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/bin/command_runner/win.rs#L128-L164","documentation":"Error \"CreateFileW failed for pipe {name}: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/bin/command_runner/win.rs:146 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}