[BUG] Terminal panel: Couldn't send the command's output to Claude - shell silently reconnects mid-command
Description
The built-in Terminal panel in Claude Desktop intermittently fails to relay command output to the chat session, showing the toast: "Couldn't send the command's output to Claude. Check the terminal tab." Inside the terminal panel itself, this coincides with the line [shell reconnected — replaying buffered output], indicating the terminal's connection to the session dropped and re-established mid-command.
Steps to reproduce
- Open the Terminal panel in Claude Desktop (macOS)
- Run a multi-second command, e.g.:
for i in {1..10}; do echo "line $i"; sleep 1; done
- Observe the toast error appearing, sometimes with garbled/interleaved input text in the terminal (characters from the typed command appear reordered)
- The command itself completes successfully (checked via the
read_terminalMCP tool, which independently confirms full correct output) — only the live relay to chat fails
What I've ruled out
- Not caused by a slow shell:
zsh -i -c exitstartup measured at ~15ms - Not caused by
.zshrc/.zprofilecontent: no precmd/preexec hooks, no gh CLI shell integration, no syntax errors (zsh -nclean) - Not caused by GitHub CLI (
gh) installation: no shell rc hooks added by gh - Not caused by a connected GitHub connector: issue persists after fully disconnecting it and restarting the app
- Not caused by hitting usage limits: at time of reproduction, 5-hour usage was 35%, weekly was 76% — nowhere near the cap
- Full app restart (Cmd+Q, relaunch) does not resolve it
- Recurs across multiple separate terminal tabs/sessions, not tied to one tab
Environment
- Claude Desktop, macOS (Darwin 27.0.0, Apple Silicon)
- Default shell: zsh
- Plan: Pro
Impact
Recurs on effectively every terminal command run from the app's Terminal panel, making it unreliable as a live-feedback channel — have to fall back to manually asking Claude to re-read terminal output via the read_terminal tool as a workaround.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗