[BUG] `claude agents` view: severe background color bleed in Apple Terminal.app on macOS (v2.1.139, dark-ansi theme)

Resolved 💬 19 comments Opened May 12, 2026 by evnchn Closed May 13, 2026
💡 Likely answer: A maintainer (bogini, collaborator) responded on this thread — see the highlighted reply below.

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)
  • COLORTERM unset (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-ansi is set in settings.json (user has opted into ANSI-only colors)
  • COLORTERM is 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

  1. On macOS (15.7.1, Apple Silicon) in Apple Terminal.app (not iTerm2, Ghostty, etc.), with theme=dark-ansi set in ~/.claude/settings.json.
  2. 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).
  3. 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_

View original on GitHub ↗

19 Comments

github-actions[bot] · 2 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/1341
  2. https://github.com/anthropics/claude-code/issues/51446
  3. https://github.com/anthropics/claude-code/issues/53406

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

evnchn · 2 months ago

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" />

evnchn · 2 months ago

iTerm2 OK

<img width="565" height="426" alt="Image" src="https://github.com/user-attachments/assets/44fa7379-ccb3-474e-b75d-1f2799c486af" />

bogini collaborator · 2 months ago

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.

evnchn · 2 months ago

Thanks for the rapid fix, I thought this would take ages with the huge backlog. You're a really efficient team!

claude[bot] contributor · 2 months ago

This issue was fixed as of version 2.1.141.

evnchn · 2 months ago

<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.

evnchn · 2 months ago

I killed all process until ps ax -o pid,comm,lstart | grep claude is 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

nicksonthc · 2 months ago

I just upgraded from 2.1.139 to v2.1.141 , the issue still persist.

Environment - Claude Code: 2.1.141 - Terminal: Apple Terminal.app - macOS: 15.7.3 (arm64, Apple Silicon) - Shell: zsh 5.9 - TERM: xterm-256color - COLORTERM: truecolor - LANG: (unset) - Node: v20.5.1

<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" />

evnchn · 2 months ago

Fresh news: claude agents using 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.

evnchn · 2 months ago

And @bogini since it apparently worked for you, also consider posting your diagnostic information as well.

evnchn · 2 months ago

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.

Please probe my system for a GitHub bug report on Claude Code's `claude agents` TUI rendering. Run these and put the raw output in a single fenced markdown block I can copy-paste:

1. `claude --version`
2. `echo "TERM=$TERM"; echo "COLORTERM=$COLORTERM"; echo "TMUX=$TMUX"; echo "TERM_PROGRAM=$TERM_PROGRAM"; echo "TERM_PROGRAM_VERSION=$TERM_PROGRAM_VERSION"; echo "LANG=$LANG"; echo "SHELL=$SHELL"`
3. `node --version`
4. `uname -a`
5. If macOS: `sw_vers`. If Linux: `cat /etc/os-release | head -5`
6. `stty size` (terminal dimensions when bug occurs)
7. `tput colors` (advertised color depth)
8. List any active `claude-code` plugins: `ls ~/.claude/plugins/ 2>/dev/null` and the contents of `~/.claude/settings.json` (redact any tokens/keys before pasting).

Also report whether the bug reproduces:
- In `/tui` fullscreen mode vs default
- With `NO_COLOR=1 claude agents`
- With `TERM=xterm-256color claude agents` (force a known TERM)
- After a full terminal `clear` followed by `claude agents`

Do not attempt to fix the bug. Just collect data.
nicksonthc · 2 months ago
Please probe my system for a GitHub bug report on Claude Code's claude agents TUI rendering. Run these and put the raw output in a single fenced markdown block I can copy-paste: 1. claude --version 2. echo "TERM=$TERM"; echo "COLORTERM=$COLORTERM"; echo "TMUX=$TMUX"; echo "TERM_PROGRAM=$TERM_PROGRAM"; echo "TERM_PROGRAM_VERSION=$TERM_PROGRAM_VERSION"; echo "LANG=$LANG"; echo "SHELL=$SHELL" 3. node --version 4. uname -a 5. If macOS: sw_vers. If Linux: cat /etc/os-release | head -5 6. stty size (terminal dimensions when bug occurs) 7. tput colors (advertised color depth) 8. List any active claude-code plugins: ls ~/.claude/plugins/ 2>/dev/null and the contents of ~/.claude/settings.json (redact any tokens/keys before pasting). Also report whether the bug reproduces: - In /tui fullscreen mode vs default - With NO_COLOR=1 claude agents - With TERM=xterm-256color claude agents (force a known TERM) - After a full terminal clear followed by claude agents Do not attempt to fix the bug. Just collect data.

Here the data

  • I have uninstalled and disabled my hooks;
  • I’m using Oh My Zsh, not sure if it’s related or not. I’ll try again tomorrow and update if I find anything new.

/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

========================================
  1. claude --version
  ========================================
  2.1.141 (Claude Code)
  
  ========================================
  2. Terminal environment
  ========================================
  TERM=xterm-256color
  COLORTERM=
  TMUX=
  TERM_PROGRAM=Apple_Terminal
  TERM_PROGRAM_VERSION=455.1
  LANG=
  SHELL=/bin/zsh
  # Note: COLORTERM and LANG are both empty.
  # LANG being unset is unusual on macOS and may be relevant for any
  # wcwidth / unicode width calculation done by the TUI renderer.

  ========================================
  3. node --version
  ========================================
  v20.5.1

  ========================================
  4. uname -a
  ========================================
  Darwin NickMacBookAir.local 24.6.0 Darwin Kernel Version 24.6.0: Wed Nov  5 21:32:56 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T8103 arm64

  ========================================
  5. sw_vers (macOS)
  ========================================
  ProductName:   macOS
  ProductVersion: 15.7.3
  BuildVersion:  24G419

  ========================================
  6. stty size  (terminal dimensions when bug occurs)
  ========================================
  stty: stdin isn't a terminal
  # Could not capture from this non-interactive shell.
  # `tput lines; tput cols` returned 24 / 80, which is just the
  # terminfo fallback when no controlling TTY is attached — NOT the
  # actual Apple Terminal window size at bug time. User should re-run
  # `stty size` themselves in the same window where the bug repros.

  ========================================
  7. tput colors
  ========================================
  256

  ========================================
  8a. ls ~/.claude/plugins/
  ========================================
  blocklist.json
  cache
  config.json
  data
  install-counts-cache.json
  installed_plugins.json
  known_marketplaces.json
  marketplaces
  repos
  
  ========================================
  8b. ~/.claude/settings.json  (no secrets present; nothing redacted)
  ========================================
  {
    "disableAllHooks": true,
    "permissions": {
      "defaultMode": "auto"
    },
    "hooks": {
      "SessionStart":      [ { "matcher": "", "hooks": [ { "type": "command", "command": "node \"/Users/nicksonthc/.velvet-owl/hook.cjs\"", "timeout": 5 } ] } ],
      "SessionEnd":        [ { "matcher": "", "hooks": [ { "type": "command", "command": "node \"/Users/nicksonthc/.velvet-owl/hook.cjs\"", "timeout": 5 } ] } ],
      "UserPromptSubmit":  [ { "matcher": "", "hooks": [ { "type": "command", "command": "node \"/Users/nicksonthc/.velvet-owl/hook.cjs\"", "timeout": 5 } ] } ],
      "Stop":              [ { "matcher": "", "hooks": [ { "type": "command", "command": "node \"/Users/nicksonthc/.velvet-owl/hook.cjs\"", "timeout": 5 } ] } ],
      "PreToolUse":        [ { "matcher": "", "hooks": [ { "type": "command", "command": "node \"/Users/nicksonthc/.velvet-owl/hook.cjs\"", "timeout": 5 } ] } ],
      "PostToolUse":       [ { "matcher": "", "hooks": [ { "type": "command", "command": "node \"/Users/nicksonthc/.velvet-owl/hook.cjs\"", "timeout": 5 } ] } ]
    },
    "statusLine": {
      "type": "command",
      "command": "bash -c 'input=$(cat); cwd=$(echo \"$input\" | jq -r \".workspace.current_dir\"); model=$(echo \"$input\" | jq -r \".model.display_name\"); rel_cwd=${cwd#$HOME}; printf \"\\033[2m%s in %s\\033[0m\" \"$model\" \"$rel_cwd\"'"
    },
    "enabledPlugins": {
      "superpowers@superpowers-dev": true,
      "autoresearch@autoresearch": true,
      "frontend-design@claude-plugins-official": true,
      "context7@claude-plugins-official": true
    },
    "extraKnownMarketplaces": {
      "superpowers-dev":         { "source": { "source": "git",    "url":  "https://github.com/obra/superpowers.git" } },
      "superpowers-marketplace": { "source": { "source": "github", "repo": "obra/superpowers-marketplace" } },
      "autoresearch":            { "source": { "source": "github", "repo": "uditgoenka/autoresearch" } }
    },
    "skipDangerousModePermissionPrompt": true,
    "theme": "dark",
    "agentPushNotifEnabled": true,
    "skipAutoPermissionPrompt": true
  }
ChaseThomas · 2 months ago

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 agents across /tui default and fullscreen, NO_COLOR=1, TERM=xterm-256color, and after clear.

========================================

  1. claude --version

========================================
2.1.141 (Claude Code)

========================================

  1. Terminal environment

========================================
TERM=xterm-256color
COLORTERM=
TMUX=
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=452
LANG=en_US.UTF-8
SHELL=/bin/zsh

========================================

  1. node --version

========================================
v23.7.0

========================================

  1. uname -a

========================================
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

========================================

  1. sw_vers

========================================
ProductName: macOS
ProductVersion: 14.2.1
BuildVersion: 23C71

========================================

  1. stty size

========================================
58 120

========================================

  1. tput colors

========================================
256

========================================

  1. ~/.claude/plugins/

========================================
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):

  • /tui default: YES
  • /tui fullscreen: YES
  • NO_COLOR=1 claude agents: YES
  • TERM=xterm-256color claude agents: YES
  • clear && claude agents: YES

~~~

evnchn · 2 months ago

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.

nicksonthc · 1 month ago

@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.

evnchn · 1 month ago

TL-DR for others: I would not recommend changing your .zshrc without 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 .zshrc without 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.

evnchn · 1 month ago
github-actions[bot] · 8 days ago

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.