[Bug] Inline renderer corrupts terminal scrollback with interleaved overwrites

Open 💬 2 comments Opened Jun 16, 2026 by steinybot

Bug Description

Inline (default) renderer corrupts terminal scrollback with interleaved overwrites — Ghostty, macOS

Environment

  • Claude Code: v2.1.177 (Homebrew cask)
  • Renderer: default / inline (NOT /tui fullscreen)
  • Terminal: Ghostty 1.3.1 (stable, Metal renderer), TERM=xterm-ghostty, COLORTERM=truecolor
  • OS: macOS (Darwin 25.4.0), locale en_NZ.UTF-8

Summary

The inline renderer permanently corrupts terminal scrollback (not just the live
screen). The live/bottom frame always renders correctly; the damage is in history that
has already scrolled up. Because it's in scrollback, it cannot be repaired — Ctrl+L only
clears/redraws the visible screen.

Two observed corruption modes

  1. Interleaved overwrite: a newer frame (input box >, status line, spinner,

"Update available" banner) is partially painted on top of older scrollback content.
Only the new frame's characters at their columns overwrite the old rows; the rest of
the old content survives — producing interleaved garbage embedded in prior output
(e.g. fragments of the prompt/statusline punched through an old file diff).

  1. Duplicated blocks: the same output (e.g. a file-edit diff, the welcome banner)

appears twice, stacked, because the old copy wasn't erased before the new paint.

Both look like a failed or mis-targeted erase-before-paint step. (The binary contains an
internal symbol needsEraseBeforePaint, FWIW.)

Reproduction

  • Non-deterministic; correlates with frequent repaints — streaming long responses and

large tool/command output (file diffs, PR creation logs). Each repaint is effectively
a dice roll; heavy-repaint moments surface it.

  • Scroll up after a busy session and you find corrupted/duplicated history above the

clean live frame.

What does NOT fix it

  • Ctrl+L — only clears the visible screen; corrupted scrollback is already committed.

Workaround

  • /tui fullscreen (alternate-screen renderer) avoids it entirely — the alt screen

has no scrollback to corrupt. Confirms the bug is specific to the inline renderer's
writes into the main screen buffer.

Related

  • #55089 — same Ghostty overlapping-text symptom, but live-screen-only and SSH-only.

This report differs: scrollback-specific, interleaved overwrite, local, inline renderer.

(Screenshots of corrupted scrollback attached.)

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.177
  • Feedback ID: 651208eb-5dcc-4bc7-9ea5-e840846db13e

Errors

[]

View original on GitHub ↗

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