[BUG] `claude agents` view: severe background color bleed in Apple Terminal.app on macOS (v2.1.139, dark-ansi theme)
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?
In the new claude agents view (added in v2.1.139 as a Research Preview, released 2026-05-11), background ANSI colors persist across cells where they shouldn't, producing large solid red/teal/yellow blocks overlaid on the agent list. Text content is rendered correctly — the bug is purely in background fill / improper reset between cells. The artifacting pattern is consistent with the chalk background-reset issue described in #1341, but on a brand-new surface (agent roster, status indicators, per-row metadata).
The notable environmental observation is that the bug reproduces under the most conservative macOS terminal configuration available:
- Apple Terminal.app (no truecolor support, only 256-color)
COLORTERMunset (no truecolor capability advertised)- Theme explicitly set to
dark-ansi(user has opted into ANSI-only colors)
This combination suggests the renderer is emitting color escape sequences that don't respect the declared terminal capabilities / theme.
Screenshot attached:
<img width="1400" height="848" alt="Image" src="https://github.com/user-attachments/assets/008f886d-011f-40a5-a794-52209cc5a787" />
What Should Happen?
The claude agents view should render with clean status indicators and per-row metadata, with proper ANSI reset sequences (\x1b[0m) terminating every background-colored span so colors stay confined to their intended cells.
Given that this environment explicitly signals an ANSI-only color budget:
theme=dark-ansiis set insettings.json(user has opted into ANSI-only colors)COLORTERMis unset (no truecolor capability advertised)TERM_PROGRAM=Apple_Terminal(does not support truecolor)
the renderer should respect those constraints and emit only ANSI-safe color escapes that terminate cleanly at cell boundaries — preventing the large solid-color blocks shown in the screenshot.
Error Messages/Logs
N/A — bug is purely visual rendering in the TUI. No errors emitted to stdout/stderr; no entries in session logs; `claude agents` returns to the prompt cleanly when exited.
Steps to Reproduce
- On macOS (15.7.1, Apple Silicon) in Apple Terminal.app (not iTerm2, Ghostty, etc.), with
theme=dark-ansiset in~/.claude/settings.json. - Launch Claude Code agent session:
claude agent. Start any task, though ones which produces tool calls and diff output glitch more (e.g. ask it to make a small edit and run tests). - Enter to the agent view, observe color bleed across rows.
The bug reproduces consistently. Screenshot in "What's Wrong?" shows the typical artifacting: large solid red, teal, and yellow rectangles overlaying the agent list, with text rendering correctly underneath.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
N/A (2.1.139 is first release)
Claude Code Version
2.1.139
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
19 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
It can't possibly be a duplicate, those 3 candidates, as those are pre-2.1.139, unless they time-travelled.
Also it works on ghostty. Team might want to expand test surface because stock terminal is a non-zero crowd size.
<img width="795" height="595" alt="Image" src="https://github.com/user-attachments/assets/bd03566c-d13b-4b11-ad70-5dd18179bdde" />
iTerm2 OK
<img width="565" height="426" alt="Image" src="https://github.com/user-attachments/assets/44fa7379-ccb3-474e-b75d-1f2799c486af" />
Thanks for reporting — confirmed. Background workers were emitting truecolor unconditionally, and Terminal.app doesn't support truecolor, so background-color sequences bled. Fixed: the worker now matches its color output to whatever the attaching terminal supports.
Ships in v2.1.141. Thanks for the screenshots — made this easy to pin down.
Thanks for the rapid fix, I thought this would take ages with the huge backlog. You're a really efficient team!
This issue was fixed as of version 2.1.141.
<img width="385" height="155" alt="Image" src="https://github.com/user-attachments/assets/b5d07377-07bc-4ae0-906c-921a510d21f1" />
@bogini No permission to re-open the issue but it still persists. I wonder if it has to do with existing agents still in old version of Claude Code, though. Will investigate.
I killed all process until
ps ax -o pid,comm,lstart | grep claudeis empty. Then I start a new task. Issue still persist.<img width="333" height="127" alt="Image" src="https://github.com/user-attachments/assets/d24a339b-4ce4-429e-b12e-b0db960d0b3f" />
According to my research, I have already purged 2.1.139 and 2.1.140 from disk, so the only possible code to be launched is 2.1.141
I just upgraded from 2.1.139 to v2.1.141 , the issue still persist.
<img width="455" height="79" alt="Image" src="https://github.com/user-attachments/assets/9f771644-c597-4fa6-911f-1912838753f8" />
<img width="1388" height="800" alt="Image" src="https://github.com/user-attachments/assets/3e1eecf3-6fce-4cf3-9fd8-5571225c433f" />
Fresh news:
claude agentsusing my friend's MacBook, built-in terminal app, somehow works. I will ask for diagnostics information.To anyone reading: if it works for you, please comment with diagnostics information so that we can narrow out what broke.
And @bogini since it apparently worked for you, also consider posting your diagnostic information as well.
OK we're getting some attention so @ChaseThomas @Messa1 @nicksonthc if you _actually_ want the bug to be fixed, consider pasting this into your Claude Code.
It's a surefire way to provide diagnostics to the team.
In fact it was what I did to prep the diagnostics for this bug report.
Also indicate if it works after 2.1.141 because your 👍's are not enough to tell.
Here the data
/tui fullscreen mode vs default - Yes , remain same still got color
NO_COLOR=1 claude agents - Yes , it pure black now , when enter session , still got color.
TERM=xterm-256color claude agents - repro yes
clear && claude agents - repro yes
LANG=en_US.UTF-8 claude agents - repro yes
I'm using Oh My ZSH too, output results below. Still persists on the latest v2.1.141 .
~~~
Still reproduces on 2.1.141 — bug appears in
claude agentsacross/tuidefault and fullscreen,NO_COLOR=1,TERM=xterm-256color, and afterclear.========================================
========================================
2.1.141 (Claude Code)
========================================
========================================
TERM=xterm-256color
COLORTERM=
TMUX=
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=452
LANG=en_US.UTF-8
SHELL=/bin/zsh
========================================
========================================
v23.7.0
========================================
========================================
Darwin 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64
========================================
========================================
ProductName: macOS
ProductVersion: 14.2.1
BuildVersion: 23C71
========================================
========================================
58 120
========================================
========================================
256
========================================
========================================
blocklist.json
cache
config.json
data
install-counts-cache.json
installed_plugins.json
known_marketplaces.json
marketplaces
repos
========================================
~/.claude/settings.json (redacted)
========================================
{
"permissions": {
"allow": ["mcp__pencil"],
"defaultMode": "bypassPermissions"
},
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{ "type": "command", "command": "~/.claude/hooks/check-prompt-clarity.sh", "statusMessage": "Checking prompt clarity" }
]
}
]
},
"enabledPlugins": {
"document-skills@anthropic-agent-skills": true,
"example-skills@anthropic-agent-skills": true,
"frontend-design@claude-plugins-official": true,
"canvas@claude-canvas": true,
"compound-engineering@every-marketplace": true,
"ccc-skills@ccc": false,
"ralph-loop@claude-plugins-official": true,
"discord@claude-plugins-official": true,
"telegram@claude-plugins-official": true
},
"effortLevel": "medium",
"skipDangerousModePermissionPrompt": true,
"theme": "auto",
"remoteControlAtStartup": false,
"agentPushNotifEnabled": true
}
Repro matrix (all reproduce):
~~~
Still have the issue on 2.1.143. Probably why I don't use the new feature much. I just have many terminal tabs instead.
@evnchn
I uninstalled Oh My Zsh, cleaned up my .zshrc, and rebooted my Mac.
Now the Claude agents (v2.1.142) no longer have the background color issue when entering a session, I not sure related to Oh My Zsh as my .zshrc got alot setting previously , now clean.
For those where it still doesn’t work, you can try cleaning up and resetting your .zshrc.
TL-DR for others: I would not recommend changing your
.zshrcwithout first updating to 2.1.143 as a low-hanging-fruit fix, which worked for me.<img width="1470" height="887" alt="Image" src="https://github.com/user-attachments/assets/fa6bf76e-17d1-41d5-bcec-3c283837435d" />
@nicksonthc Note that I did not touch those two files in any way except by automated installers, which the timestamp says was last edited
2026-04-29, well before the feature in question is released. I can't deduce whether 2.1.142 required clearing.zshrcwithout extensive backtracing work, though.It's not perfect because the Claude Code icon rendering is still a bit messed up:
<img width="71" height="52" alt="Image" src="https://github.com/user-attachments/assets/3a803d35-82d8-4505-8126-785d614f3521" /> (bugged)
<img width="70" height="50" alt="Image" src="https://github.com/user-attachments/assets/5bc8705a-fecb-4894-90ce-c8636c80c56f" /> (normal)
but it's not a deal-breaker.
https://github.com/anthropics/claude-code/blob/2962ecd7a9477817d8a2a2b2bd40a7a96ecef3c8/CHANGELOG.md?plain=1#L54
Could just be the fix not shipping in 2.1.141 as originally said in https://github.com/anthropics/claude-code/issues/58458#issuecomment-4434577474, so all is fine, the fix is working but just delayed.
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.