[BUG] ANSI escape sequences not properly rendered in terminal display

Resolved 💬 4 comments Opened Aug 13, 2025 by Coelancanth Closed Jan 3, 2026
  • Platform (select one):
  • Anthropic API
  • AWS Bedrock
  • Google Vertex AI
  • Other:
  • Claude CLI version: 1.0.77 (Claude Code)
  • Operating System: Windows 10
  • Terminal: PowerShell

Bug Description

ANSI escape sequences are displayed as raw text instead of being properly rendered as colors or stripped from the terminal output. This causes visual
clutter and makes the interface difficult to read.

Steps to Reproduce

  1. Launch Claude Code in PowerShell on Windows 10
  2. Have any terminal prompt with color formatting (even with Oh My Posh disabled)
  3. Observe the prompt display in Claude Code interface

Expected Behavior

ANSI escape sequences should either be:

  • Properly interpreted and displayed as colored text, OR
  • Stripped entirely to show clean text without escape codes

Actual Behavior

Raw ANSI escape sequences are displayed as literal text, showing patterns like:
e[38;2;227;100;100m@Coel
e[0me[38;2;86;182;194mblocklifee[0me[38;2;221;177;95mgit(e[0me[38;2;212;170;252mmaine[0me[38;2;221;177;95m)e[0m
e[38;2;220;185;119mSonnet 4e[0m

Additional Context

  • The issue persists even when Oh My Posh prompt customization is disabled
  • The escape sequences appear to be missing the proper escape character prefix (should be \e[ or \033[ but showing as just e[)
  • This affects readability and creates visual noise in the interface
  • The underlying project functionality works correctly; this is purely a display formatting issue

<img width="1581" height="242" alt="Image" src="https://github.com/user-attachments/assets/41b4c95a-efb9-4c58-b974-6076e93d476f" />

View original on GitHub ↗

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