atuinsh/atuin · error
stdout was piped
Error message
stdout was piped
What it means
Error "stdout was piped" thrown in atuinsh/atuin.
Source
Thrown at crates/atuin-ai/src/tools/mod.rs:853
let start = std::time::Instant::now();
// TODO: check if this is proper for all shells we support
let mut cmd = tokio::process::Command::new(&shell_call.shell);
cmd.arg("-c").arg(&shell_call.command);
cmd.stdout(std::process::Stdio::piped());
cmd.stderr(std::process::Stdio::piped());
if let Some(ref dir) = shell_call.dir {
cmd.current_dir(dir);
}
let mut child = match cmd.spawn() {
Ok(child) => child,
Err(e) => return ToolOutcome::Error(format!("Failed to spawn command: {e}")),
};
let stdout = child.stdout.take().expect("stdout was piped");
let stderr = child.stderr.take().expect("stderr was piped");
// VT100 emulator for the live preview (viewport-sized)
let mut parser = vt100::Parser::new_safe(PREVIEW_HEIGHT, PREVIEW_WIDTH, 0);
let mut stdout_reader = tokio::io::BufReader::new(stdout);
let mut stderr_reader = tokio::io::BufReader::new(stderr);
let mut stdout_buf = [0u8; 4096];
let mut stderr_buf = [0u8; 4096];
let mut stdout_done = false;
let mut stderr_done = false;
// Full output buffers (for the LLM, not the preview)
let mut full_stdout = Vec::<u8>::new();
let mut full_stderr = Vec::<u8>::new();
let mut interval = tokio::time::interval(Duration::from_millis(50));View on GitHub (pinned to 15fe1318f1)
Solutions
- Run the tool with stdout attached to a terminal, not a pipe.
When it happens
Trigger: Fires in AI tooling when an invariant that stdout must be a terminal is violated because stdout is piped.
Common situations: See trigger scenarios.
AI-assisted analysis of atuinsh/atuin@15fe1318f1 (2026-08-19).
Data as JSON: /api/errors/60c2d2e20a1a1ab0.
Report an issue: GitHub.