{"record":{"id":"066e2770648db589","repo":"openai/codex","slug":"process-is-not-attached-to-a-pty","errorCode":null,"errorMessage":"process is not attached to a PTY","messagePattern":"process is not attached to a PTY","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/utils/pty/src/process.rs","lineNumber":208,"sourceCode":"                .lock()\n                .map_err(|_| anyhow!(\"failed to lock PTY handles\"))?;\n            if let Some(handles) = handles.as_ref() {\n                return match &handles._master {\n                    PtyMasterHandle::Resizable(master) => master.resize(size.into()),\n                    #[cfg(unix)]\n                    PtyMasterHandle::Opaque { raw_fd, .. } => resize_raw_pty(*raw_fd, size),\n                };\n            }\n        }\n\n        let mut resizer = self\n            .resizer\n            .lock()\n            .map_err(|_| anyhow!(\"failed to lock PTY resizer\"))?;\n        if let Some(resizer) = resizer.as_mut() {\n            resizer(size)\n        } else {\n            Err(anyhow!(\"process is not attached to a PTY\"))\n        }\n    }\n\n    /// Close the child's stdin channel.\n    pub fn close_stdin(&self) {\n        if let Ok(mut writer_tx) = self.writer_tx.lock() {\n            writer_tx.take();\n        }\n    }\n\n    /// Attempts to kill the child while leaving the reader/writer tasks alive\n    /// so callers can still drain output until EOF.\n    pub fn request_terminate(&self) {\n        if let Ok(mut killer_opt) = self.killer.lock()\n            && let Some(mut killer) = killer_opt.take()\n        {\n            let _ = killer.kill();\n        }","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/utils/pty/src/process.rs#L190-L226","documentation":"Error \"process is not attached to a PTY\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/utils/pty/src/process.rs:208 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"}