anthropics / anthropics/claude-code

[BUG] Terminal panel: Couldn't send the command's output to Claude - shell silently reconnects mid-command

Open
#95,522 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:desktop bug has repro platform:macos
Dominant language
TypeScript
Stars
147k
Forks
24k
PR merge metrics
PR metrics pending

Description

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

  1. Open the Terminal panel in Claude Desktop (macOS)
  2. Run a multi-second command, e.g.:
    for i in {1..10}; do echo "line $i"; sleep 1; done
  3. Observe the toast error appearing, sometimes with garbled/interleaved input text in the terminal (characters from the typed command appear reordered)
  4. The command itself completes successfully (checked via the read_terminal MCP 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 exit startup measured at ~15ms
  • Not caused by .zshrc/.zprofile content: no precmd/preexec hooks, no gh CLI shell integration, no syntax errors (zsh -n clean)
  • 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in the Claude Desktop Terminal panel with the provided multi-second zsh loop, then compare the live chat relay with the read_terminal MCP tool's output. Done means the command output reaches chat without a shell reconnect, garbled input, or the "Couldn't send the command's output to Claude" toast.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, zsh
Domain
cli, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.