zed-industries/zed · error · TerminalError
Working directory: {} Shell command: `{}`, IOError: {}
Error message
Working directory: {} Shell command: `{}`, IOError: {} What it means
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.
Source
Thrown at crates/terminal/src/terminal.rs:1191
let (program, args) = match &shell_params {
Some(params) => (
params.program.clone(),
params.args.clone().unwrap_or_default(),
),
None => (util::shell::get_system_shell(), Vec::new()),
};
let subprocess = match spawn_task_subprocess(
program,
args,
env.clone(),
working_directory.clone(),
term.clone(),
events_tx,
&background_executor,
) {
Ok(subprocess) => subprocess,
Err(error) => {
bail!(TerminalError {
directory: working_directory,
program: shell_params.as_ref().map(|params| params.program.clone()),
args: shell_params.as_ref().and_then(|params| params.args.clone()),
title_override: terminal_title_override,
source: std::io::Error::other(format!("{error:#}")),
});
}
};
(TerminalType::DisplayOnly, Some(subprocess))
} else {
let alacritty_shell = shell_params.as_ref().map(|params| {
(
params.program.clone(),
params.args.clone().unwrap_or_default(),
)
});
let pty_options = pty_options(
alacritty_shell,View on GitHub (pinned to f4178619ac)
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/terminal/src/terminal.rs:1191 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/95818d4d5541c195.
Report an issue: GitHub.