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

Resolved 💬 23 comments Opened May 14, 2026 by Faithfinder Closed May 20, 2026
💡 Likely answer: A maintainer (diana-ant, collaborator) responded on this thread — see the highlighted reply below.

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

  • #58094 — VS Code integrated terminal on Windows, triggered by /compact, with stale content appearing as bitmap residue. Likely the same mechanism family (Claude-Code-internal screen state going bad in a way the terminal can't recover), but a different platform and a more specific trigger.
  • #52527 — macOS but Apple Terminal (not VS Code), and the corruption there is per-character random swaps rather than screen-wide glyph replacement.
  • #50314 — macOS + VS Code, but specifically about colors making text invisible rather than glyph corruption.

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.

View original on GitHub ↗

23 Comments

github-actions[bot] · 2 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/42010
  2. https://github.com/anthropics/claude-code/issues/52527
  3. https://github.com/anthropics/claude-code/issues/58853

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

ahmad-rammal · 2 months ago

Is anyone facing this issue on VS Code where you'll be in the middle of the task, and, for no reason, you get this error message?

Unhandled case: [object Object]
View output logs · [Troubleshooting resources](https://code.claude.com/docs/en/vs-code#troubleshooting)

The logs show nothing important for this issue.

Faithfinder · 2 months ago
<img alt="Image" width="1385" height="428" src="https://private-user-images.githubusercontent.com/82173398/592668619-2df35be6-6411-4751-a2cb-5e999f2a355d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Nzg3ODI5NDIsIm5iZiI6MTc3ODc4MjY0MiwicGF0aCI6Ii84MjE3MzM5OC81OTI2Njg2MTktMmRmMzViZTYtNjQxMS00NzUxLWEyY2ItNWU5OTlmMmEzNTVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA1MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNTE0VDE4MTcyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIzYzhhM2YxYWYxODRmYzc1N2I1YjlkMzE1Y2VmZTdjN2YyZDExM2FiNWQ3M2FkMTBhZDM0ZDcyNWMyYzRmOGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.cpTGOYXIRiTKHRr2kxU8Fxm4XoNpfixThXQpvKFK5wQ"> I have exactly the same issue. This is pretty annoying.

Oh, thanks for the screenshot, I lost mine when posting

r0bdiabl0 · 2 months ago

Here is an example screenshot

<img width="1242" height="617" alt="Image" src="https://github.com/user-attachments/assets/36870e77-f325-4a89-b7e2-776cb39a60b4" />

DeJayDev · 2 months ago

Persists to Claude Code 2.1.143.

Adding that it's unrelated to compaction, but it can be worked around by ending the session and resuming in another Terminal. It can bleed to the TTY, it's not isolated to the Claude Code process.

<img width="205" height="188" alt="Image" src="https://github.com/user-attachments/assets/2eddd625-3831-45ec-851d-dbe04049759c" /> <img width="416" height="147" alt="Image" src="https://github.com/user-attachments/assets/243650fe-108c-4a2a-adbd-883b5d494996" />

lemerv · 2 months ago

I get this happening consistently when using the /clear Claude command. It immediately garbles after that.

anthonyhunter · 2 months ago

Terminal -> Integrated -> GPU Acceleration = OFF worked for me

rbtcollins · 2 months ago

I have this issue regularly. ctrl-Z, reset, fg, fixes it for me.

EnjouZeratul · 2 months ago

Splitting the terminal pane and immediately closing it forces the terminal to rebuild the rendering surface. may helpful.

nyavana · 1 month ago

I have the same issue running Claude Code on VS Code on Win11 PC
It has been here for months and was never fixed.

Can confirm https://github.com/anthropics/claude-code/issues/59163#issuecomment-4467698148 ctrl-Z, reset, fg method or https://github.com/anthropics/claude-code/issues/59163#issuecomment-4466266679 disable GPU acceleration works for me.

diana-ant collaborator · 1 month ago

Hello, this issue should have been fixed in v2.1.144. Could you please try to update and confirm if it hasn't? Thanks!

mcxgr · 1 month ago
Hello, this issue should have been fixed in v2.1.144. Could you please try to update and confirm if it hasn't? Thanks!

not being offered 2.1.144 here. Problem surely exists on 2.1.143

shw1606 · 1 month ago

I think I have a way to reproduce this.

For me it happens when I switch macOS Spaces (Mission Control) and come
back to the terminal. Just a few Space switches are enough, even on a
fresh session. Time the window stays on background Space seems to matter
more than session length.

Something specific to my case: I am a Korean user, so my session has a
mix of English and Korean (Hangul) text. When the bug happens, Korean
characters do not show at all, screen looks almost empty. Dragging the
broken area to force repaint (the trick from #59915) recovers most of
the English text, but Korean only partially comes back. So CJK / wide
characters seem to be hit harder than ASCII.

I was already using fullscreen mode (CLAUDE_CODE_NO_FLICKER=1) when it
broke. So fullscreen does not help.

Recovery is same as in the issue, only killing claude and --resume works.

macOS, M1 Pro, claude 2.1.143, VSCode integrated terminal.

<img width="1104" height="655" alt="Image" src="https://github.com/user-attachments/assets/f18826de-ce4c-49d2-9392-28011f1a810b" />

matchan26 · 1 month ago

@diana-ant Thanks for the update. Unfortunately I can confirm the issue still reproduces on v2.1.144 in the VS Code integrated terminal on macOS. The screen garbling behavior is unchanged from earlier versions — symptoms and recovery (kill +
--resume, or ctrl-Z / reset / fg) are identical to what others reported on 2.1.143.

Environment:

  • Claude Code: 2.1.144
  • OS: macOS 26.2 (Build 25C56), arm64 (Apple Silicon)
  • Kernel: Darwin 25.2.0
  • Shell: zsh
  • Terminal: VS Code integrated terminal (TERM_PROGRAM=vscode, version 1.120.0)
  • TERM: xterm-256color
  • Node: v24.11.1
mcxgr · 1 month ago
@diana-ant Thanks for the update. Unfortunately I can confirm the issue still reproduces on v2.1.144 in the VS Code integrated terminal on macOS. The screen garbling behavior is unchanged from earlier versions — symptoms and recovery (kill + --resume, or ctrl-Z / reset / fg) are identical to what others reported on 2.1.143. Environment: Claude Code: 2.1.144 OS: macOS 26.2 (Build 25C56), arm64 (Apple Silicon) Kernel: Darwin 25.2.0 Shell: zsh Terminal: VS Code integrated terminal (TERM_PROGRAM=vscode, version 1.120.0) TERM: xterm-256color * Node: v24.11.1

+1

JoannaSapiecha · 1 month ago
diana-ant collaborator · 1 month ago

Could you please set this in VSCode settings and try again? "terminal.integrated.gpuAcceleration": "off"

We think this may be an upstream issue, not a Claude Code bug. Thank you in advance!

lawso017 · 1 month ago

I believe this is GPU related. If I move the VS Code window to a secondary monitor, normal text rendering is restored.

diana-ant collaborator · 1 month ago

Thanks for confirming. I'll close this out as it's a non-Claude Code related issue but have noted it internally.

albyno99 · 1 month ago

<img width="1121" height="867" alt="Image" src="https://github.com/user-attachments/assets/2df62b20-ec76-464d-998b-457e72cb4e1c" />

rahulmehta25 · 1 month ago

<img width="859" height="345" alt="Image" src="https://github.com/user-attachments/assets/2adbb333-f8b5-4da1-95d3-02ac9bfb68ab" />

emlautarom1 · 1 month ago

<img width="1306" height="502" alt="Image" src="https://github.com/user-attachments/assets/324a4562-1670-4ba8-82c8-0b294f98d7d8" />