Skip to content

[BUG] TUI character corruption after long sessions in VS Code integrated terminal (macOS, v2.1.141) #59163

Description

@Faithfinder

What's wrong?

After a long session in the VS Code integrated terminal on macOS, the Claude Code TUI starts rendering most characters as garbled glyphs. The corruption is screen-wide rather than localized: ANSI colors, column alignment, and indentation are all preserved, but the glyphs themselves are wrong — they look like random box-drawing/punctuation characters in the right color slots. A few stripes of the buffer (typically blocks that were rendered recently) still show correct text, so the result is a mix of readable patches interleaved with garbled lines.

Screenshot of the corrupted state will be attached as a follow-up comment.

What should happen?

Text should keep rendering correctly for the duration of the session, regardless of how long it has been running.

Steps to reproduce

Reproduction is currently imprecise — I don't have a deterministic trigger:

  1. Open Claude Code in the VS Code integrated terminal on macOS.
  2. Use it normally for an extended period (multiple hours / many tool calls / a long conversation).
  3. At some point during the session, the TUI starts rendering most characters as garbled glyphs as described above.

No specific action (paste, resize, slash command, hook event, tool result) consistently triggers it that I've been able to identify. It just degrades over time.

Recovery

Only quitting and relaunching claude restores correct rendering. None of the following help:

  • Scrolling up/down inside the VS Code terminal panel.
  • Resizing the VS Code terminal panel.
  • clear / Ctrl-L.
  • Switching to another VS Code terminal tab and back.

That nothing on the terminal side fixes it suggests Claude Code's internal screen model has been corrupted and Claude Code keeps writing the bad glyphs — it's not the terminal emulator's own back-buffer that's wrong.

Environment

  • Claude Code version: 2.1.141
  • OS: macOS (Darwin 25.5.0)
  • Terminal: VS Code integrated terminal
  • Shell: zsh

Related issues

This case looks distinct from those, hence a new report. If anyone has a deterministic trigger or a tighter time-to-failure, please drop it in the comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:tuibugSomething isn't workingplatform:macosIssue specifically occurs on macOSplatform:vscodeIssue specifically occurs in VS Code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions