{"record":{"id":"031d31ef5f6ebfbd","repo":"zellij-org/zellij","slug":"could-not-flush","errorCode":null,"errorMessage":"could not flush","messagePattern":"could not flush","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"zellij-client/src/lib.rs","lineNumber":722,"sourceCode":"            // Handle terminal messages\n            terminal_msg = connections.terminal_ws.next() => {\n                match terminal_msg {\n                    Some(Ok(Message::Text(text))) => {\n                        let mut stdout = os_input.get_stdout_writer();\n                        if let Some(sync) = synchronised_output {\n                            stdout\n                                .write_all(sync.start_seq())\n                                .expect(\"cannot write to stdout\");\n                        }\n                        stdout\n                            .write_all(text.as_bytes())\n                            .expect(\"cannot write to stdout\");\n                        if let Some(sync) = synchronised_output {\n                            stdout\n                                .write_all(sync.end_seq())\n                                .expect(\"cannot write to stdout\");\n                        }\n                        stdout.flush().expect(\"could not flush\");\n                    }\n                    Some(Ok(Message::Binary(data))) => {\n                        let mut stdout = os_input.get_stdout_writer();\n                        if let Some(sync) = synchronised_output {\n                            stdout\n                                .write_all(sync.start_seq())\n                                .expect(\"cannot write to stdout\");\n                        }\n                        stdout\n                            .write_all(&data)\n                            .expect(\"cannot write to stdout\");\n                        if let Some(sync) = synchronised_output {\n                            stdout\n                                .write_all(sync.end_seq())\n                                .expect(\"cannot write to stdout\");\n                        }\n                        stdout.flush().expect(\"could not flush\");\n                    }","sourceCodeStart":704,"sourceCodeEnd":740,"githubUrl":"https://github.com/zellij-org/zellij/blob/e839bfffa586992364309a685b2c71f3b23c247e/zellij-client/src/lib.rs#L704-L740","documentation":"Error \"could not flush\" thrown in zellij-org/zellij.","triggerScenarios":"Occurs at zellij-client/src/lib.rs:705 when the operation fails: \"could not flush\". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.","commonSituations":"Running under a non-tty, redirected stdout, or a terminal that disappeared.","solutions":["Ensure zellij runs attached to a real terminal with write access.","Check the attached OS error for details (closed stdout, unsupported terminal)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e839bfffa586992364309a685b2c71f3b23c247e","analyzedAt":"2026-08-19T07:42:58.758Z","contentChangedAt":"2026-08-19T07:42:58.758Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}