[BUG] Write tool code preview renders invisible keywords

Resolved 💬 1 comment Opened May 15, 2026 by jails Closed Jun 14, 2026

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?

  • Claude Code version: 2.1.142
  • OS: Linux (KDE Plasma)
  • Terminal emulator: Konsole
  • Shell: bash

The Write tool visualization is broken since 2.1.140 or 2.1.141, the inline code preview only renders some keyword tokens and somehow invisible, as if their foreground color matches the terminal background.

<img width="591" height="263" alt="Image" src="https://github.com/user-attachments/assets/4ea9c6ad-9e61-479f-af1e-82c8617679bb" />

What Should Happen?

This is the expected output I used to have until 2.1.140 or 2.1.141

<img width="409" height="318" alt="Image" src="https://github.com/user-attachments/assets/057352b3-d91e-493b-9261-21aa81e7d667" />

Error Messages/Logs

Steps to Reproduce

  1. Open Claude
  2. Ask for a file change

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.139

Claude Code Version

2.1.142

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗