claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Terminal resize causes content loss - lines are disappeared when shrinking window

Open dqaria opened this issue 10 months ago • 2 comments

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?

  1. All existing conversation content should be preserved in the scrollback buffer
  2. Content should reflow properly to fit the new terminal dimensions
  3. The display should re-render correctly without losing any lines

Error Messages/Logs


Steps to Reproduce

  1. Open terminal (I use Ghostty)
  2. Launch Claude Code with claude command
  3. Have a conversation (e.g., type "hello, how are you" and get a response)
Image
  1. Resize the terminal window by dragging the corner to make it smaller/narrower
  2. Observe that previous conversation content disappears/gets consumed
Image

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

dqaria avatar Jan 16 '26 05:01 dqaria

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/10239
  2. https://github.com/anthropics/claude-code/issues/17056
  3. 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

github-actions[bot] avatar Jan 16 '26 05:01 github-actions[bot]

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 statusLine config
  • Disabled claude-hud plugin
  • 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.

Kari-Basavaraj avatar Jan 17 '26 10:01 Kari-Basavaraj