[BUG] Windows VS Code terminal output becomes garbled (CJK-looking glyphs) after ~60–90 minutes of session

Resolved 💬 2 comments Opened May 16, 2026 by Abelmateus Closed Jun 16, 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?

After approximately 60–90 minutes of a single Claude Code session in the VS Code integrated terminal on Windows 11, the terminal output starts rendering as CJK-looking glyphs — characters that look like Chinese ideograms instead of normal text. This appears to be a console code-page corruption: the Windows console seems to switch from UTF-8 (CP 65001) back to a legacy code page (CP 936 / GBK or similar) mid-session. Once the corruption begins, all subsequent terminal output is unreadable until the terminal is restarted (losing the scrollback context of the long-running session).

Workarounds tried:

  • chcp 65001 at session start: partially effective, recurs after long-running output.
  • Setting PYTHONIOENCODING=utf-8: doesn't prevent the terminal-level corruption.
  • Switching from PowerShell 5.1 to PowerShell 7: not verified yet.

What Should Happen?

Terminal output should remain in the configured encoding (UTF-8) throughout the entire Claude Code session, regardless of session length or amount of mixed-Unicode output produced.

Error Messages/Logs

(Garbled output example — actual rendering shows CJK-looking glyphs instead of the intended text. Cannot paste a faithful sample because the underlying bytes are transcoded incorrectly by the time they reach the clipboard.)

Steps to Reproduce

  1. Open VS Code on Windows 11.
  2. Start a Claude Code session in the integrated terminal (PowerShell).
  3. Work through tasks that produce mixed Unicode output — currency symbols (£, €), em-dashes (—), Greek letters in equations (ε, θ, β), accented characters from Portuguese/Spanish text, etc.
  4. After roughly 60–90 minutes of continuous session work the terminal renders all subsequent output as CJK-looking garbled glyphs.
  5. Restarting the terminal restores normal rendering.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

(please run claude --version and paste output here)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Suspected cause: Windows console code page being reset (possibly when a Python subprocess writes a different encoding, or when stdout buffer flushes mid-line). The issue is reproducible across multiple sessions on the same Windows 11 machine. Happy to provide a session transcript or run additional diagnostics on request.

Tagging this as a Windows-platform terminal-encoding bug rather than a Claude-model-behaviour bug.

View original on GitHub ↗

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