[BUG] Every character typed in the Claude Code TUI causes a line of chat history to disappear
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?
Every character typed in the Claude Code TUI causes a line of chat history to disappear from the display. The chat content is being progressively hidden line-by-line as I type, making it impossible to read the conversation while composing messages.
Resizing the terminal window temporarily restores all content, proving the data is still there and the terminal can render it correctly, but as soon as I start typing again, the lines disappear one-by-one with each keystroke.
What Should Happen?
The chat history should remain fully visible and stable while typing new messages. Previous conversation lines should not disappear or be affected by input events.
Error Messages/Logs
Steps to Reproduce
- Launch Claude Code in macOS Terminal.app:
claude - Start any conversation with Claude
- Wait for Claude to respond (creating several lines of chat history)
- Begin typing a new message in the input area
- Observe: With each character typed, one line of previous chat history disappears from the top of the display
- Continue typing: Lines continue to disappear sequentially
- Resize the terminal window: All content returns temporarily
- Type another character: Lines start disappearing again immediately
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.26
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Previous issue https://github.com/anthropics/claude-code/issues/10045 was incorrectly closed even though it is still happening in the latest version.
Terminal sizes tested:
- 80x24 (default): Issue occurs
- 269x66 (maximum screen size): Issue occurs identically
- Size does not appear to be a factor
Workarounds attempted that did NOT help:
- CTRL+L refresh: No effect
- Increasing terminal size: No improvement
- Different terminal sizes: Same behavior at all sizes
Temporary workaround that works:
- Resizing the terminal window restores content temporarily, but typing resumes the bug immediately
Technical observation:
The fact that resizing fixes it temporarily suggests the full screen redraw logic is correct, but the incremental rendering logic (triggered by input events) has a bug where it miscalculates the display buffer position by approximately one line per keystroke.
This appears to be an issue with cursor position tracking or screen buffer management during input handling, likely introduced in a recent refactor of the TUI rendering code.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗