Skip to content

[BUG] Claude Code Terminal Color Rendering Bug #29706

Description

@clive627

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Code Terminal Color Rendering Bug

Summary

Claude Code renders terminal colors incorrectly, causing large portions of the screen to display with bright green and magenta/pink backgrounds, making the terminal unreadable. The NO_COLOR=1 environment variable is not respected.

Environment

  • Claude Code version: 2.1.22
  • OS: Debian Linux (kernel 6.1.0-42-amd64)
  • Shell: Bash
  • Terminal emulators tested: lxterminal, kitty, xterm, alacritty (all affected)

Problem Description

When running Claude Code, the terminal displays corrupted background colors - specifically bright lime green and magenta/pink backgrounds that cover large portions of the screen. This makes it impossible to read text or see what is being typed.

Key observations:

  1. Multiple terminals affected: Tested with lxterminal, kitty, xterm, and alacritty - all show the same problem
  2. NO_COLOR=1 not respected: Setting export NO_COLOR=1 before launching Claude does not fix the issue
  3. FORCE_COLOR=0 not respected: Also tried FORCE_COLOR=0 with no effect
  4. Persistent issue: This has been happening for months across multiple Claude Code versions
  5. Only affects Claude Code: Normal terminal usage works fine; the problem only appears inside Claude Code sessions

Screenshot

Terminal color corruption

The screenshot shows bright green and magenta backgrounds bleeding across the terminal, obscuring text.

Workaround

Setting TERM=dumb before launching Claude Code fixes the issue:

TERM=dumb claude

Or as an alias:

alias claude='TERM=dumb claude'

This disables the fancy terminal rendering and makes Claude Code usable, though without color support.

Expected Behavior

  1. Claude Code should render colors correctly in standard terminal emulators
  2. Claude Code should respect NO_COLOR=1 environment variable per the NO_COLOR standard
  3. A --no-color CLI flag would be helpful for users experiencing color issues

Steps to Reproduce

  1. Open any terminal emulator (lxterminal, kitty, xterm, alacritty)
  2. Run claude
  3. Observe corrupted green/magenta background colors covering the screen

Additional Context

  • The issue appears to be related to how Claude Code outputs ANSI escape sequences for 24-bit/truecolor
  • Standard 256-color or 16-color terminals may handle this differently
  • The corruption persists even after running terminal reset commands (reset, printf '\e[0m')

What Should Happen?

I should be able to read the terminal without insane colors making that impossible.

Error Messages/Logs

Steps to Reproduce

load claude in my computer.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

hasn't worked right ever. It's been months.

Claude Code Version

2.1.22 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

ACTIVITY_LOG_INSERTION_POINTS.md
Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:tuibugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on LinuxstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions