[BUG] ANSI terminal control in `Bash` command outputs not reset back to normal.

Resolved 💬 2 comments Opened Jul 3, 2025 by ANogin Closed Aug 7, 2025

Environment

  • Platform (select one):
  • [X] Anthropic API (using subscription)
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.41
  • Operating System: Ubuntu 22.04
  • Terminal: VScode Shell

Bug Description

When a bash command outputs terminal control escape symbols, without cancelling them (e.g. because Claude Code is running in non-verbose mode, so only shows the very start of the output, which contains the control escape, but not the rest of the output that "closes" the escape symbol), then that affects all the subsequent Claude Code output, until something randomly happens to cancel it. Particularly, I am suffering from double underlines in ROS warnings.

Steps to Reproduce

  • Create a command that outputs the ^[[33;21m escape sequence, but does not output the matching ^[[0m or outputs it late enough to not be included in the amount of Bash command output Claude shows in non-verbose mode.
  • Cause Claude Code to execute the command.

Expected Behavior

Claude Code knows to reset any ANSI terminal control to default state after finishing with Bash output

Actual Behavior

Session stays double-underlined :(

View original on GitHub ↗

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