{"record":{"id":"d3fbf29130a2fc47","repo":"zellij-org/zellij","slug":"could-not-enable-raw-mode","errorCode":null,"errorMessage":"could not enable raw mode","messagePattern":"could not enable raw mode","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"zellij-client/src/os_input_output.rs","lineNumber":180,"sourceCode":"    fn env_variable(&self, _name: &str) -> Option<String> {\n        None\n    }\n    /// Returns an async stdin reader that can be polled in tokio::select\n    fn get_async_stdin_reader(&self) -> Box<dyn AsyncStdin> {\n        Box::new(AsyncStdinReader::new())\n    }\n    /// Returns an async signal listener that can be polled in tokio::select\n    fn get_async_signal_listener(&self) -> io::Result<Box<dyn AsyncSignals>> {\n        Ok(Box::new(AsyncSignalListener::new()?))\n    }\n}\n\nimpl ClientOsApi for ClientOsInputOutput {\n    fn get_terminal_size(&self) -> Size {\n        get_terminal_size()\n    }\n    fn set_raw_mode(&mut self) {\n        crossterm::terminal::enable_raw_mode().expect(\"could not enable raw mode\");\n    }\n    fn unset_raw_mode(&self) -> Result<(), std::io::Error> {\n        crossterm::terminal::disable_raw_mode()\n    }\n    fn box_clone(&self) -> Box<dyn ClientOsApi> {\n        Box::new((*self).clone())\n    }\n    fn update_session_name(&mut self, new_session_name: String) {\n        *self.session_name.lock().unwrap() = Some(new_session_name);\n    }\n    fn read_from_stdin(&mut self) -> Result<Vec<u8>, &'static str> {\n        let session_name_at_calltime = { self.session_name.lock().unwrap().clone() };\n        // here we wait for a lock in case another thread is holding stdin\n        // this can happen for example when switching sessions, the old thread will only be\n        // released once it sees input over STDIN\n        //\n        // when this happens, we detect in the other thread that our session is ended (by comparing\n        // the session name at the beginning of the call and the one after we read from STDIN), and","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/zellij-org/zellij/blob/bf8d23a4f774abf27a108da2a1a2689e7d8d0d23/zellij-client/src/os_input_output.rs#L162-L198","documentation":"Error \"could not enable raw mode\" thrown in zellij-org/zellij.","triggerScenarios":"Occurs at zellij-client/src/os_input_output.rs:172 when the operation fails: \"could not enable raw mode\". 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":"bf8d23a4f774abf27a108da2a1a2689e7d8d0d23","analyzedAt":"2026-08-19T07:42:58.758Z","contentChangedAt":"2026-08-19T07:42:58.758Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}