{"record":{"id":"512d5b87a5073458","repo":"openai/codex","slug":"updateprocthreadattribute-failed","errorCode":null,"errorMessage":"UpdateProcThreadAttribute failed: {}","messagePattern":"UpdateProcThreadAttribute failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/utils/pty/src/win/procthreadattr.rs","lineNumber":114,"sourceCode":"\n    unsafe fn update(\n        &mut self,\n        attribute: usize,\n        value: *mut c_void,\n        size: usize,\n    ) -> Result<(), Error> {\n        let res = unsafe {\n            UpdateProcThreadAttribute(\n                self.as_mut_ptr(),\n                0,\n                attribute,\n                value,\n                size,\n                ptr::null_mut(),\n                ptr::null_mut(),\n            )\n        };\n        ensure!(\n            res != 0,\n            \"UpdateProcThreadAttribute failed: {}\",\n            IoError::last_os_error()\n        );\n        Ok(())\n    }\n}\n\nimpl Drop for ProcThreadAttributeList {\n    fn drop(&mut self) {\n        unsafe { DeleteProcThreadAttributeList(self.as_mut_ptr()) };\n    }\n}\n","sourceCodeStart":96,"sourceCodeEnd":128,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/utils/pty/src/win/procthreadattr.rs#L96-L128","documentation":"UpdateProcThreadAttribute returned zero for one of the attributes being set (PTY handle, job object, pseudoconsole, or handle list); the message embeds the last OS error. Windows refused the attribute value/size pair while preparing the child process.","triggerScenarios":"Thrown at codex-rs/utils/pty/src/win/procthreadattr.rs:114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the last OS error for the failing attribute (e.g. invalid handle)","Verify the handle being passed is open and of the right type","Retry the operation after re-opening the PTY/job handles"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}