[BUG] TUI character corruption after long sessions in VS Code integrated terminal (macOS, v2.1.141)
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:
- Open Claude Code in the VS Code integrated terminal on macOS.
- Use it normally for an extended period (multiple hours / many tool calls / a long conversation).
- 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.
23 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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?
The logs show nothing important for this issue.
Oh, thanks for the screenshot, I lost mine when posting
Here is an example screenshot
<img width="1242" height="617" alt="Image" src="https://github.com/user-attachments/assets/36870e77-f325-4a89-b7e2-776cb39a60b4" />
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" />
I get this happening consistently when using the /clear Claude command. It immediately garbles after that.
Terminal -> Integrated -> GPU Acceleration = OFF worked for me
I have this issue regularly. ctrl-Z, reset, fg, fixes it for me.
Splitting the terminal pane and immediately closing it forces the terminal to rebuild the rendering surface. may helpful.
+1
https://github.com/user-attachments/assets/bb7deb0b-39b9-4016-84ab-4d24fb7a4258
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, fgmethod or https://github.com/anthropics/claude-code/issues/59163#issuecomment-4466266679disable GPU accelerationworks for me.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
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" />
@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, orctrl-Z/reset/fg) are identical to what others reported on 2.1.143.Environment:
+1
The same Issue, see: https://github.com/anthropics/claude-code/issues/59915#issuecomment-4487487571
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!
I believe this is GPU related. If I move the VS Code window to a secondary monitor, normal text rendering is restored.
Thanks for confirming. I'll close this out as it's a non-Claude Code related issue but have noted it internally.
<img width="1121" height="867" alt="Image" src="https://github.com/user-attachments/assets/2df62b20-ec76-464d-998b-457e72cb4e1c" />
<img width="859" height="345" alt="Image" src="https://github.com/user-attachments/assets/2adbb333-f8b5-4da1-95d3-02ac9bfb68ab" />
<img width="1306" height="502" alt="Image" src="https://github.com/user-attachments/assets/324a4562-1670-4ba8-82c8-0b294f98d7d8" />