[BUG] Visual duplication of code blocks when scrolling up in terminal
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?
Description:
When scrolling up in a long response containing code blocks, the code content is visually repeated (2-3 times) on screen. The actual response content is correct — it's purely a
rendering issue in the terminal.
Environment:
- OS: Linux Ubuntu (kernel 6.17)
- Terminal: GNOME Terminal (xterm-256color)
- Claude Code version: 2.1.138
Actual behavior: Code block content is repeated 2-3 times while scrolling, as shown in the screenshot below.
<img width="1195" height="792" alt="Image" src="https://github.com/user-attachments/assets/7b54c0dd-5746-4d0e-9fdd-d491273ee5e8" />
What Should Happen?
Expected behavior: Code block content appears once.
Error Messages/Logs
Steps to Reproduce
- Ask Claude Code for a response containing a long code block
- Scroll up in the terminal to read the beginning of the code block
- The code block content appears duplicated on screen
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.138
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Xterm
Additional Information
_No response_
3 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
same issue as #53492
I close this issue
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.