[BUG] Terminal resize causes content loss - lines are disappeared when shrinking window
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?
When resizing the terminal window (specifically making it smaller/narrower), Claude Code's rendered content gets corrupted. Previous conversation lines are disappear upward. The display does not properly re-render or preserve the scrollback buffer during resize operations.
What Should Happen?
- All existing conversation content should be preserved in the scrollback buffer
- Content should reflow properly to fit the new terminal dimensions
- The display should re-render correctly without losing any lines
Error Messages/Logs
Steps to Reproduce
- Open terminal (I use Ghostty)
- Launch Claude Code with claude command
- Have a conversation (e.g., type "hello, how are you" and get a response)
- Resize the terminal window by dragging the corner to make it smaller/narrower
- Observe that previous conversation content disappears/gets consumed
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.8
Claude Code Version
2.1.9
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/10239
- https://github.com/anthropics/claude-code/issues/17056
- https://github.com/anthropics/claude-code/issues/13723
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Additional Reproduction Details
Confirming this issue on v2.1.11 with similar setup.
My observations:
- Resizing Ghostty window causes conversation content to completely disappear
- Also affects unsent input text in the buffer
- Issue persists in Terminal.app as well
Environment:
- Claude Code: 2.1.11
- macOS: Darwin 25.0.0 (arm64)
- Terminal: Ghostty 1.2.3, Terminal.app (both affected)
- Shell: zsh
- TERM: xterm-256color
Troubleshooting attempted (none resolved):
- Disabled custom
statusLineconfig - Disabled
claude-hudplugin - Set Ghostty
shell-integration-features = no-cursor - Full terminal restart
This appears related to other TUI rendering issues:
- #17816 (slash command highlight offset)
- #18716 (/context disappears)
- #18797 (cursor blinks below status bar)
May share a common root cause in TUI rendering.