[BUG] Enlarging terminal window causes duplicate Claude UI instances to stack vertically
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Body:
## Description
When resizing (enlarging) the terminal window while Claude Code is running, the TUI does not redraw in place — instead it
renders a new copy of the UI below the existing one, causing multiple stacked instances to appear on screen.
## Expected Behavior
The UI should redraw in place when the terminal is resized, replacing the old layout cleanly.
Enlarging the window causes duplicate copies of the Claude Code UI to stack vertically on screen. Each resize adds another copy
underneath the previous one.
## Observations
- Only occurs when enlarging the window (not confirmed on shrink)
- Terminal correctly forwards the resize signal —
stty sizereports updated dimensions immediately after resize, confirming
SIGWINCH propagates
- The issue is on Claude Code's side: it does not redraw in place after receiving the signal
- Functionally the session still works, but the visual stacking makes the interface confusing
## Steps to Reproduce
- Open Terminal.app on macOS
- Start
claudeCLI - While Claude Code is running, enlarge the terminal window
- Observe duplicate UI instances stacked vertically
## Environment
- OS: macOS (Darwin 25.3.0)
- Terminal: Terminal.app
- Shell: zsh
- Claude Code: latest
## Related
- #16578 — similar ANSI cursor movement / redraw issue in long conversations (closed as not planned)
What Should Happen?
Expected Behavior
The UI should redraw in place when the terminal is resized, replacing the old layout cleanly.
Error Messages/Logs
Steps to Reproduce
## Steps to Reproduce
- Open Terminal.app on macOS
- Start
claudeCLI - While Claude Code is running, enlarge the terminal window
- Observe duplicate UI instances stacked vertically
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
latest
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗