TUI duplicates last assistant message + footer in scrollback on long replies

Resolved 💬 3 comments Opened Apr 27, 2026 by moralex777 Closed Apr 27, 2026

Environment

  • Claude Code: 2.1.119
  • Model: Opus 4.7 (1M context)
  • Terminal: xfce4-terminal
  • $TERM: xterm-256color
  • OS: Linux 6.8.0-107-generic (Ubuntu)
  • Shell: bash

Description

After a long assistant reply (200+ lines) completes, the entire last block — assistant message body, ※ recap line, divider, prompt, and status footer (token counter, mode banner, statusLine) — appears 2-3 times consecutively in scrollback. Sometimes the session start banner also re-renders. Reviewing past output is painful because the same content scrolls past 2-3x.

Repro

  1. Launch claude in xfce4-terminal.
  2. Send a prompt that produces 300+ lines of output (e.g., "read settings.json and summarize every top-level key in 2-3 sentences each").
  3. After completion, scroll back through scrollback.
  4. Expected: each block appears exactly once.
  5. Actual: the last assistant block + footer (and sometimes session banner) appears 2-3x in succession.

Already ruled out

  • Custom statusLine (bash …/statusline-venture-git.sh) — replaced with echo 'Claude | alex', duplication still occurs.
  • Cached statusLine wrapper (10s TTL) — duplication still occurs.
  • Stop / PostToolUse hooks — none of the configured hooks emit the duplicated content (verified by grep).

Hypothesis

TUI re-paints the static "below-the-fold" footer when terminal viewport reflows, and previous frames leak into scrollback instead of being cleared. Possibly an Ink/React render issue interacting with xfce4-terminal's alt-screen handling.

Pasted scrollback example available on request.

View original on GitHub ↗

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