[BUG] ANSI escape sequences shown literally(raw) in terminal (unparsed color codes) in insert mode

Resolved 💬 2 comments Opened Sep 29, 2025 by UtsavBalar1231 Closed Oct 1, 2025

Preflight Checklist

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

What's Wrong?

<img width="1929" height="806" alt="Image" src="https://github.com/user-attachments/assets/0aa9c8cd-98e7-49f0-b89b-47b9559fd828" />

Running claude-code version 2.0.0 (Claude Code) using kitty terminal v0.43.
You can notice the term codes [39m[7m being shown when moving the cursor in the ultrathink text while writing a prompt.

Issue it not related to kitty terminal, same thing happens in ghostty or any other terminal. the $TERM is xterm-256color

What Should Happen?

These term codes should be escaped instead of being shown literally.

Error Messages/Logs

Steps to Reproduce

  1. Open latest claude-code in kitty terminal
  2. Enable vim mode /vim
  3. In insert mode, type the prompt with text ultrathink
  4. In insert mode, move the cursor left inside the ultrathink text

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.0 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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