AskUserQuestion modal leaves rendering artefacts in tmux after dismiss
Description
When the AskUserQuestion tool renders a modal overlay in a tmux pane (typically from a teammate agent), dismissing the modal does not properly repaint the lines it occupied. Ghost rendering from the modal persists over the conversation output until the tmux window is resized.
Screenshot
The screenshot below shows the main conversation pane with leftover artefacts from an AskUserQuestion modal that was displayed in a teammate agent's tmux pane. The modal content ("Finding 6/6", "6 (Minor): Cross-repo blast radius") and its border box are visible overlaid on the main pane output.
Steps to reproduce
- Create a team with
TeamCreate - Spawn a teammate agent that uses
AskUserQuestion(e.g. a review agent presenting findings) - Answer the question in the teammate's tmux pane
- Switch back to the main pane - ghost rendering from the dismissed modal is visible
Workaround
Resizing the tmux window forces a full redraw (SIGWINCH) and clears the artefacts.
Expected behaviour
Dismissing the AskUserQuestion modal should repaint the affected terminal lines, restoring the underlying content.
Environment
- Claude Code: 2.1.87
- macOS: 26.2 (Build 25C56, Apple Silicon arm64)
- tmux: 3.6a
- TERM: tmux-256color
- TERM_PROGRAM: tmux
Notes
- Started appearing in recent builds (user reports it was not present in earlier versions)
- Distinct from the phantom message injection bug reported in #40166
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗