{"record":{"id":"681e92dc9218149f","repo":"zellij-org/zellij","slug":"no-conpty-terminal-found-for-id","errorCode":null,"errorMessage":"no ConPTY terminal found for id {}","messagePattern":"no ConPTY terminal found for id (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"zellij-server/src/os_input_output_windows.rs","lineNumber":602,"sourceCode":"        {\n            Some(Some(term)) => {\n                let mut written: u32 = 0;\n                let ok = unsafe {\n                    WriteFile(\n                        term.input_write_handle,\n                        buf.as_ptr(),\n                        buf.len() as u32,\n                        &mut written,\n                        std::ptr::null_mut(),\n                    )\n                };\n                if ok == 0 {\n                    Err(io::Error::last_os_error()).with_context(err_context)\n                } else {\n                    Ok(written as usize)\n                }\n            },\n            _ => Err(anyhow!(\"no ConPTY terminal found for id {}\", terminal_id))\n                .with_context(err_context),\n        }\n    }\n\n    pub fn tcdrain(&self, terminal_id: u32) -> Result<()> {\n        let err_context = || format!(\"failed to drain terminal {}\", terminal_id);\n\n        match self\n            .terminals\n            .lock()\n            .to_anyhow()\n            .with_context(err_context)?\n            .get(&terminal_id)\n        {\n            Some(Some(term)) => {\n                let ok = unsafe { FlushFileBuffers(term.input_write_handle) };\n                if ok == 0 {\n                    // FlushFileBuffers can legitimately fail on pipe handles","sourceCodeStart":584,"sourceCodeEnd":620,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-server/src/os_input_output_windows.rs#L584-L620","documentation":"Error \"no ConPTY terminal found for id {}\" thrown in zellij-org/zellij.","triggerScenarios":"Thrown at zellij-server/src/os_input_output_windows.rs:602 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":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}