{"record":{"id":"95818d4d5541c195","repo":"zed-industries/zed","slug":"working-directory-shell-command-ioerror","errorCode":null,"errorMessage":"Working directory: {} Shell command: `{}`, IOError: {}","messagePattern":"Working directory: (.+?) Shell command: `(.+?)`, IOError: (.+?)","errorType":"exception","errorClass":"TerminalError","httpStatus":null,"severity":"error","filePath":"crates/terminal/src/terminal.rs","lineNumber":1191,"sourceCode":"                    args,\n                    title_override,\n                } => Some(ShellParams::new(program, Some(args), title_override)),\n            };\n            let terminal_title_override =\n                shell_params.as_ref().and_then(|e| e.title_override.clone());\n\n            #[cfg(windows)]\n            let shell_program = shell_params.as_ref().map(|params| {\n                use util::ResultExt;\n\n                Self::resolve_path(&params.program)\n                    .log_err()\n                    .unwrap_or(params.program.clone())\n            });\n\n            // Note: when remoting, this shell_kind will scrutinize `ssh` or\n            // `wsl.exe` as a shell and fall back to posix or powershell based on\n            // the compilation target. This is fine right now due to the restricted\n            // way we use the return value, but would become incorrect if we\n            // supported remoting into windows.\n            let shell_kind = shell.shell_kind(cfg!(windows));\n\n            let scrolling_history = if task.is_some() {\n                // Tasks like `cargo build --all` may produce a lot of output, ergo allow maximum scrolling.\n                // After the task finishes, we do not allow appending to that terminal, so small tasks output should not\n                // cause excessive memory usage over time.\n                MAX_SCROLL_HISTORY_LINES\n            } else {\n                max_scroll_history_lines\n                    .unwrap_or(DEFAULT_SCROLL_HISTORY_LINES)\n                    .min(MAX_SCROLL_HISTORY_LINES)\n            };\n            let config = pty_term_config(scrolling_history, cursor_shape);\n\n            //Spawn a task so the Alacritty EventLoop (or the subprocess reader) can communicate with us\n            //TODO: Remove with a bounded sender which can be dispatched on &self","sourceCodeStart":1173,"sourceCodeEnd":1209,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/terminal/src/terminal.rs#L1173-L1209","documentation":"When spawning a task terminal, the subprocess could not be spawned; the working directory, shell command, and underlying IO error are combined into this diagnostic so the user can see why the task terminal failed.","triggerScenarios":"Thrown at crates/terminal/src/terminal.rs:1191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the shell program exists and is executable on PATH","Check the working directory still exists; fix the terminal working-directory setting","Inspect the IOError field for the concrete OS error (permissions, missing binary)","Try a different shell in terminal settings"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}