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
- Configure custom statusline script in
~/.claude/settings.json - Script outputs ANSI escape codes using printf
- Statusline displays raw codes instead of colors
Technical Details
The statusline script uses standard ANSI escape codes:
\033[33mfor yellow text\033[0mfor reset\033[96mfor bright cyan
These work correctly in terminal but not in Claude Code's statusline rendering.
Possible Causes
- Claude Code statusline renderer doesn't support ANSI escape codes
- Unicode terminal handling different from ASCII
- Need different escape sequence format for Claude Code
Requested Solution
Either:
- Enable ANSI escape code rendering in statusline
- Document proper color formatting for statuslines
- Provide alternative color formatting method
This affects users who want colored, informative statuslines for better UX.
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗