Statusline ANSI escape codes not rendering properly with Unicode terminal

Resolved 💬 11 comments Opened Aug 27, 2025 by shadowkon007 Closed Jan 6, 2026

Issue Description

The Claude Code statusline is displaying raw ANSI escape codes instead of rendering them as colors when using a Unicode-enabled terminal.

Expected Behavior

Statusline should display colored text like:

  • Model name in cyan
  • Directory path in blue
  • Git branch in appropriate colors
  • Usage indicators with color coding

Actual Behavior

Statusline shows raw escape sequences like:
\033[33mmain\033[0m* instead of colored text

Environment

  • macOS Darwin 24.6.0
  • Terminal: Unicode enabled
  • Claude Code with custom statusline script
  • Zsh with Powerlevel10k theme

Reproduction Steps

  1. Configure custom statusline script in ~/.claude/settings.json
  2. Script outputs ANSI escape codes using printf
  3. Statusline displays raw codes instead of colors

Technical Details

The statusline script uses standard ANSI escape codes:

  • \033[33m for yellow text
  • \033[0m for reset
  • \033[96m for bright cyan

These work correctly in terminal but not in Claude Code's statusline rendering.

Possible Causes

  1. Claude Code statusline renderer doesn't support ANSI escape codes
  2. Unicode terminal handling different from ASCII
  3. Need different escape sequence format for Claude Code

Requested Solution

Either:

  1. Enable ANSI escape code rendering in statusline
  2. Document proper color formatting for statuslines
  3. Provide alternative color formatting method

This affects users who want colored, informative statuslines for better UX.

View original on GitHub ↗

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