[BUG] Stale background color artifacts (stale cells) left behind by floating overlays

Resolved 💬 2 comments Opened Apr 26, 2026 by SherlockSalvatore Closed May 30, 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?

When using Claude Code, floating UI elements (like the "1 new message (ctrl+End) ↓" notification badge) leave behind visual artifacts after they disappear or when the view is scrolled.

These artifacts manifest as solid grey background blocks that obscure the text underneath. The text characters themselves are still rendered correctly, but the background color attribute (SGR) of those cells is not being properly reset.

<img width="1115" height="225" alt="Image" src="https://github.com/user-attachments/assets/4d50b880-2431-45da-82ee-d2a7b5de349b" />

What Should Happen?

When floating UI elements are removed or the view is scrolled, the terminal cells should be completely cleared of their background attributes, returning to the normal terminal background.

Error Messages/Logs

no error and logs,only like this

Steps to Reproduce

  1. Start claude in the Ghostty terminal (running directly, NO tmux involved).
  2. Let the assistant generate a long response and scroll up slightly so the floating badge ("1 new message (ctrl+End) ↓") appears.
  3. Scroll down or wait for the badge to disappear/re-render.
  4. Observe the grey background blocks left behind where the badge used to be.
  5. Note: Pressing Ctrl+L forces a redraw and fixes the visual corruption, indicating an SGR reset sequence is missing when clearing the overlay.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Ghostty, TERM: xterm-ghostty

View original on GitHub ↗

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