claude-code - 💡(How to fix) Fix [BUG] CLI output becomes corrupted with unreadable/garbled tokens until restart [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#46411Fetched 2026-04-11 06:21:01
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4closed ×1commented ×1

Error Message

Error Messages/Logs

No clear runtime error was displayed.

Root Cause

  1. Open Claude Code in a terminal.
  2. Start a normal conversation and let Claude generate a longer multi-line response.
  3. In my case, this appeared while Claude was outputting Russian/Cyrillic text, but the root cause may be general terminal rendering/output corruption.
  4. After some output, random unreadable/garbled characters began appearing inline in the response.
  5. Continue interacting in the same session: the corruption persists.
  6. Restart the Claude Code CLI.
  7. After restart, the output returns to normal.

Fix Action

Fix / Workaround

While using Claude Code in the terminal, the assistant output becomes visually corrupted: random unreadable/garbled tokens and stray characters start appearing inside otherwise normal text. This makes the response difficult to read. The issue persists for subsequent output and is only resolved by restarting the Claude Code CLI.

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?

While using Claude Code in the terminal, the assistant output becomes visually corrupted: random unreadable/garbled tokens and stray characters start appearing inside otherwise normal text. This makes the response difficult to read. The issue persists for subsequent output and is only resolved by restarting the Claude Code CLI.

From the screenshot, the corruption appears inline within regular prose rather than as a normal encoding failure for the entire line. It looks like rendering/output corruption in the terminal stream.

Image

What Should Happen?

Claude Code should render responses cleanly in the terminal, without inserting random unreadable symbols or broken tokens into the text. Output should remain stable across the session and should not require restarting the CLI.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in a terminal.
  2. Start a normal conversation and let Claude generate a longer multi-line response.
  3. In my case, this appeared while Claude was outputting Russian/Cyrillic text, but the root cause may be general terminal rendering/output corruption.
  4. After some output, random unreadable/garbled characters began appearing inline in the response.
  5. Continue interacting in the same session: the corruption persists.
  6. Restart the Claude Code CLI.
  7. After restart, the output returns to normal.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.101

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Restarting the CLI immediately fixes the problem, but only temporarily. No clear runtime error was displayed. The issue affects readability of normal assistant responses. It may be related to terminal rendering, unicode/Cyrillic handling, ANSI styling, or stream corruption during long responses. I have attached a screenshot showing the corrupted output.

extent analysis

TL;DR

The issue can be temporarily fixed by restarting the Claude Code CLI, but a more permanent solution may involve investigating terminal rendering or Unicode handling issues.

Guidance

  • Investigate the handling of Unicode characters, particularly Cyrillic text, in the Claude Code output to determine if this is a contributing factor to the corruption.
  • Check the terminal settings and configuration to ensure that it is properly set up to handle Unicode characters and ANSI styling.
  • Consider testing the Claude Code output with different languages and character sets to see if the issue is specific to Russian/Cyrillic text or if it is a more general problem.
  • Look into the Anthropic API documentation to see if there are any known issues or limitations with regards to terminal rendering or output corruption.

Example

No specific code example can be provided without more information about the underlying implementation of the Claude Code CLI.

Notes

The issue may be related to the specific terminal or shell being used, so testing with different terminals or shells may help to isolate the problem. Additionally, the fact that restarting the CLI temporarily fixes the issue suggests that the problem may be related to some kind of internal state or caching mechanism.

Recommendation

Apply workaround: Restart the Claude Code CLI when the issue occurs, and consider testing with different terminal settings and configurations to try to find a more permanent solution.

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

claude-code - 💡(How to fix) Fix [BUG] CLI output becomes corrupted with unreadable/garbled tokens until restart [1 comments, 2 participants]