claude-code - 💡(How to fix) Fix [BUG] TUI emits strikethrough on arbitrary text - reproduces on 2.1.150 in both diff view and normal output

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

When using claude cli it displays random ascii characters after using it a while.

What Should Happen?

Preflight Checklist

  • I have searched existing issues and this hasn't been reported in this specific form
  • This is a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

The Claude Code TUI is rendering arbitrary text with strikethrough formatting where none was intended. It appears the renderer is emitting ANSI SGR 9 (or equivalent) around tokens that should not be styled at all.

This is NOT limited to the diff renderer. It fires in normal assistant chat output as well.

Two distinct repro patterns observed in the same session:

  1. Diff view, JavaScript keywords: In an added-line diff block (green/plus lines), the bare keywords if and return render with a full strikethrough across the word. No surrounding tildes, no markdown syntax, no ~ characters anywhere in the line. The strikethrough is applied directly to the keyword tokens.

  2. Normal assistant output, underscored identifier in parentheses: In a regular response paragraph, a parenthesized identifier like (wp_wqly_qlx_qmu_...) renders with strikethrough applied to every single character including the underscores. Surrounding text in the same line ("Backend", "now short-circuits") renders normally.

This appears related to but distinct from the GFM tilde-as-strikethrough reports in #19251 and #9757, both of which are currently marked stale. Those issues describe literal ~text~ wrapping triggering strikethrough. This report covers text that does not contain tildes at all.

What Should Happen?

Text should render without strikethrough unless the source content explicitly uses ~~strikethrough~~ GFM syntax. JavaScript keywords in diff output and underscored identifiers in normal prose should render as plain text with normal syntax highlighting.

Steps to Reproduce

Exact trigger is not yet isolated, but the bug fires reliably during:

  • Reviewing proposed file edits where the diff contains JS keywords like if / return / function
  • Reading normal assistant responses that include parenthesized identifiers with underscores

The bug persists across:

  • New sessions
  • /clear
  • Restarting Claude Code
  • Restarting the VS Code integrated terminal

Claude Code Version

2.1.150

VS Code Extension Version

2.1.150 (IDE bridge server 2.1.145)

Model

Opus 4.7 with 1M context

Platform

Anthropic API (Claude Max account)

Operating System

Windows 11

Terminal/Shell

VS Code integrated terminal on Windows 11

Additional Information

Reproduces on the latest CLI, latest VS Code extension, and current IDE bridge, so the differential renderer rewrite from late January 2026 did not address this case.

Related stale issues:

  • #19251 (GFM tilde-as-strikethrough, reopened Jan 2026, stale)
  • #9757 (original tilde-as-strikethrough, closed and locked Oct/Nov 2025)

Both describe the tilde-input case. This report adds a non-tilde input case that the existing reports do not cover. Screenshots attached showing both manifestations.

<img width="549" height="172" alt="Image" src="https://github.com/user-attachments/assets/aafbbd51-3fd9-44e7-92e1-87302d2df293" /> <img width="1219" height="316" alt="Image" src="https://github.com/user-attachments/assets/9c7046ad-d355-4bad-abb1-7455aade2d94" />

Error Messages/Logs

Steps to Reproduce

Use Claude CLI

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude Code CLI: 2.1.150 VS Code extension: 2.1.150 (server 2.1.145) Model: Opus 4.7 (1M context) OS: Windows 11 Terminal: VS Code integrated terminal Login: Claude Max

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

<img width="1219" height="316" alt="Image" src="https://github.com/user-attachments/assets/2b420433-7151-445d-a85b-22a6cb3fbc8d" /> <img width="549" height="172" alt="Image" src="https://github.com/user-attachments/assets/781b6a69-7cfc-4a0f-aed0-a7ba9bca2f08" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING