[BUG] Visual duplication of code blocks when scrolling up in terminal

Resolved 💬 3 comments Opened May 9, 2026 by aducos Closed May 10, 2026

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

  1. Ask Claude Code for a response containing a long code block
  2. Scroll up in the terminal to read the beginning of the code block
  3. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗