[Bug] Duplicate text + tool-call blocks after tool error on Linux TUI (v2.1.185)
Open 💬 0 comments Opened Jun 22, 2026 by barikata1984
Bug Description
When a tool call fails with an error, the retry sometimes renders the preceding text output and the tool call block twice in the terminal. The duplicated block is an exact copy — same text, same tool invocation, same error output.
Observed pattern
- Assistant outputs explanatory text ("原因と対処が明確になった...")
- Assistant calls a tool (
wpctl settings --save ...) → tool returns error - The same text block + tool call appears again in the terminal output
- Assistant then proceeds with a different approach
This happened twice in the same session — once for the wpctl command and once for a wpctl --version call immediately after.
Screenshot of actual output
● 原因と対処が明確になった。
原因: WirePlumber の bluetooth.autoswitch-to-headset-profile が有効で...
対処: 自動切り替えを無効にする。一行で済む:
● Bash(wpctl settings --save bluetooth.autoswitch-to-headset-profile false && echo "Done")
⎿ Error: Exit code 1 ...
● 原因と対処が明確になった。 ← DUPLICATE
原因: WirePlumber の bluetooth.autoswitch-to-headset-profile が有効で...
対処: 自動切り替えを無効にする。一行で済む:
● Bash(wpctl settings --save bluetooth.autoswitch-to-headset-profile false && echo "Done")
⎿ Error: Exit code 1 ... ← DUPLICATE
● バージョンが古い。設定ファイルで対処する。 ← actual continuation
Context
- The session had been running for a while and had gone through context compaction at least once
- Hooks were active (UserPromptSubmit, SubagentStart, PostToolUse, Stop, TaskCompleted)
- Model: claude-opus-4-6 (1M context)
- outputStyle: Concise
- This is NOT a terminal resize/scroll issue — it happened during normal streaming output
Possibly related
- #53492 — similar duplicate output report on Linux (v2.1.119, gnome-terminal)
- #52924 — TUI duplicates rendered text in scrollback on long sessions
- #64209 — Tool-layer unreliability in long/compacted sessions
Environment Info
- Platform: Linux (Ubuntu, kernel 6.17.0-35-generic)
- Terminal: likely gnome-terminal or kitty (standard desktop session)
- Claude Code version: 2.1.185
- Shell: zsh