Retry prompt "no visible output" injected when a turn ends with a tool call, even when the tool produces output
Status Open
Reported on v2.1.212
Maintainer reply None cached
Activity 1 comment · opened Jul 17, 2026
Environment
- Claude Code: 2.1.212
- OS: macOS (Darwin 25.5.0)
- Terminal: Ghostty 1.3.1, TERM=xterm-ghostty
- Renderer: /tui fullscreen (CLAUDE_CODE_NO_FLICKER=1)
Steps to reproduce
- In an interactive session, ask Claude to write a text response and then run
echo okas the very last action of the turn, ending the turn without any further text. - The command prints
okto stdout and the assistant text renders normally on screen. - After the turn ends, this message is injected and the assistant regenerates a response:
[Your previous response had no visible output. Please continue and produce a user-visible response.]
Additional observations
- The same injection occurs when the last action of the turn is an MCP tool call, including one that returns a non-empty text content block with
isError: false. - When the same tool calls happen mid-turn and the turn ends with a text message, no retry prompt is injected.
- All cases were reproduced in the same session, minutes apart.
Impact
- The retry causes duplicated responses in the transcript.
- In everyday sessions with this tool-call-last pattern (e.g. a notification tool invoked at the end of each task, as instructed by CLAUDE.md), the assistant's final text message is sometimes not visible in the terminal at all. In the controlled reproductions above the text stayed visible, so the missing-text symptom is intermittent.
Expected behavior
No "no visible output" retry prompt when the turn contains a visible assistant text response.
Related
#70422 reports this for a Bash command with no stdout as the last action. The reproduction above shows the injection also occurs when the final Bash command does produce stdout, and with MCP tool calls that return text content.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗