Terminal UI becomes corrupted after resizing window
Description
When resizing the terminal window while using Claude Code, the terminal UI can become visually corrupted.
After the resize, previous prompt text and message blocks may appear duplicated, shifted, or overlaid on top of other content. Grey highlighted prompt/input areas can also be rendered in the wrong position, making the conversation difficult to read.
This seems related to terminal redraw/reflow behavior after a window resize event, and wide-character text such as Chinese may make the issue more visible.
Steps to reproduce
- Open Claude Code in a terminal.
- Send a prompt that produces multi-line output, especially output containing Chinese text and code blocks.
- Wait for the response to finish.
- Resize the terminal window horizontally or vertically.
- Observe that previous content becomes misaligned, duplicated, or overlaid.
Expected behavior
After resizing the terminal window, Claude Code should correctly redraw or reflow the existing UI without overlapping, duplicating, or misplacing previous content.
Actual behavior
The terminal display becomes corrupted after resizing:
- Previous prompt text appears multiple times.
- Grey prompt/input blocks are rendered in incorrect positions.
- Some content overlaps other content.
- Wide-character text such as Chinese appears to make the issue more visible.
Environment
- OS: macOS Darwin 24.6.0
- Shell: zsh
- Terminal app: Ghostty 1.3.1
- Claude Code version: 2.1.141
$TERM: xterm-ghostty- Running inside tmux/screen: not specified
Notes
A temporary workaround is to clear or redraw the terminal manually, for example with Ctrl+L or clear, but the issue returns after resizing again.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗