[BUG] Progressive text rendering corruption in long-running terminal sessions (macOS / Electron)

Resolved 💬 9 comments Opened May 15, 2026 by Manzela Closed May 19, 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?

In long-running sessions (25+ hours), terminal output progressively develops text rendering corruption. Characters are replaced with garbled glyphs, block characters (█), and wrong-charset substitutions across all output types:

  1. Task summary lines — the task name, elapsed time, and token/cost metadata render as solid red/dark blocks with unreadable characters. The subtask text beneath remains partially legible.
  2. Structured lists — numbered items show sporadic glyph corruption mid-word. Some items render cleanly while adjacent items are garbled (e.g., list items 2, 4, 5 corrupted while 1, 3, 6 are fine).
  3. Code diffs — the most severe: diff views show heavily corrupted text where YAML keys, variable names, and inline comments become unreadable, while the diff background colors (red/green) remain partially intact.

The corruption accumulates over time. Short sessions render correctly. After many hours of continuous use, corruption frequency and severity increase progressively. The underlying operations complete successfully — the bug is purely visual.

What Should Happen?

All terminal output should render legibly with correct character encoding regardless of session duration.

Error Messages/Logs

# No explicit errors thrown. Operations succeed; the issue is purely visual.
# Corruption manifests as:
#   - Block characters (█) replacing normal text
#   - Garbled/shifted glyphs mid-word
#   - Characters from wrong character sets appearing inline
#   - Diff line content corrupted while diff highlight colors remain intact

Steps to Reproduce

  1. Open Claude Code in an Electron-based IDE terminal (VS Code or similar) where TERM=dumb
  2. Start working on a multi-file project with varied output types (file edits, git diffs, structured plans)
  3. Keep the session running continuously for 10+ hours without restarting
  4. Observe progressive rendering degradation:
  • Early: occasional character replacements in status/summary lines
  • Mid: numbered lists show corrupted characters mid-word
  • Late (25h+): code diffs become nearly unreadable with pervasive glyph corruption
  1. Restarting the CLI session clears the corruption immediately

Reproduction confidence: Observed consistently across two separate 25+ hour sessions running concurrently. A third session running for ~35 minutes in the same environment showed clean rendering, confirming session duration as the primary variable.

Claude Model

Sonnet (default) — also observed when switching models mid-session; the bug is model-agnostic (rendering layer)

Is this a regression?

I don't know

Last Working Version

N/A — observed on current version; not sure about prior versions.

Claude Code Version

2.1.142 (Claude Code)

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Environment Details
macOS 26.4.1 (Build 25E253)
Darwin Kernel 25.4.0, ARM64 (Apple M2 Max, 12-core, 32 GB)
Shell: /bin/zsh
Locale: C.UTF-8
TERM: dumb
Node.js: v22.20.0
npm: 10.9.3
Claude Code Configuration (relevant settings)
{
  "model": "claude-sonnet-4-6[1m]",
  "editorMode": "vim",
  "alwaysThinkingEnabled": true,
  "effortLevel": "xhigh",
  "showSpinnerTree": false,
  "statusLine": {
    "type": "command",
    "command": "bash -c '... printf \"%s@%s %s %%\" ...'"
  },
  "enabledPlugins": [
    "frontend-design",
    "ralph-loop",
    "superpowers",
    "context7",
    "github",
    "playwright"
  ],
  "hooks": {
    "PermissionRequest": [{ "type": "command", "command": "afplay ...", "async": true }]
  }
}
Session Rendering Metrics (from last session)
frame_duration_ms_count: 44
frame_duration_ms_min:   0.076 ms
frame_duration_ms_max:   4.816 ms
frame_duration_ms_avg:   1.095 ms
frame_duration_ms_p50:   0.801 ms
frame_duration_ms_p95:   3.760 ms
frame_duration_ms_p99:   4.468 ms

Frame times look healthy in isolation — which suggests the corruption is not caused by frame drops but by ANSI state accumulation over time.

Contributing Factors

Several configuration elements may compound the issue:

  • TERM=dumb — Electron-based IDE terminals typically report this, which disables Synchronized Output. The TUI renderer may emit ANSI sequences the terminal cannot fully process.
  • Custom statusLine — executes a shell command for the status bar, adding continuous rendering overhead.
  • 6 plugins enabled — increased rendering surface from plugin output.
  • alwaysThinkingEnabled + effortLevel: xhigh — longer response cycles mean more sustained rendering.
  • Multiple concurrent sessions — two 25h+ sessions running simultaneously in the same IDE may amplify buffer pressure.
Workarounds

| Workaround | Result |
|---|---|
| Restart CLI session | ✅ Clears corruption immediately |
| reset command in terminal | ⚠️ Partial improvement |
| Ctrl+O transcript mode | ✅ Bypasses TUI rendering entirely |
| Locale already C.UTF-8 | N/A — encoding is correct |

View original on GitHub ↗

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