[BUG] Stale background color artifacts (stale cells) left behind by floating overlays
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
- Start
claudein the Ghostty terminal (running directly, NO tmux involved). - Let the assistant generate a long response and scroll up slightly so the floating badge (
"1 new message (ctrl+End) ↓") appears. - Scroll down or wait for the badge to disappear/re-render.
- Observe the grey background blocks left behind where the badge used to be.
- Note: Pressing
Ctrl+Lforces 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
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗