[BUG] Fullscreen TUI: stale spinner rows + statusline vertical desync under nested/parallel subagent load (WSL2, v2.1.178)

Resolved 💬 3 comments Opened Jun 16, 2026 by h2suzuki Closed Jun 17, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code (v2.1.178)

Environment

  • Claude Code: 2.1.178 (latest)
  • OS: WSL2 (Linux 6.12 kernel) on Windows
  • Terminal: Windows Terminal — WT_SESSION is set (e.g. fbd66005-…), confirming WT; note TERM_PROGRAM is unset despite this (WT sets WT_SESSION but not TERM_PROGRAM)
  • Shell: bash, running as root via sudo -i, with sudo Defaults !use_pty (default use_pty disabled — see discriminators)
  • TERM: xterm-256color; COLORTERM unset
  • Setting: "tui": "fullscreen"

What's Wrong?

With "tui": "fullscreen", the no-flicker differential renderer leaves stale cells and overlapping lines when the agent-progress region grows/shrinks rapidly under heavy nested/parallel subagent load. Concrete artifacts (see screenshot):

  • spinnerVerbs rows (e.g. Newspapering…) multiply and are never cleared — old frames' rows linger on screen
  • the statusline renders in the middle of the screen instead of pinned to the bottom (vertical position desync)
  • the prompt/composer input line is drawn over content from above
  • bottom-row garbage fragments left behind (e.g. ns, 2, 20, a doubled ), stray es)
  • a hint line (…without interrupting Claude's current work) collides on top of a data row
  • token/label text merges, e.g. Running 3 claude◆agents… es, claud (+2), claude(+3))
  • after all agents complete, the screen mostly self-recovers without Ctrl+L (a steady-state repaint cleans most stale cells)

Reproduction

  1. Set "tui": "fullscreen" in ~/.claude/settings.json.
  2. From the main conversation, spawn many concurrent + nested subagents. I used 12 total = 3 parallel chains, each nesting 4 levels deep via the Task/Agent tool (each agent spawns exactly one haiku child; recursive nesting added in 2.1.172). The progress tree + agent list (shown with (+N) nesting badges) grows and shrinks quickly.
  3. Watch the fullscreen TUI during the run.
  4. Observe: stale spinner rows, mid-screen statusline, input-line overdraw, bottom-row garbage.
  5. After agents finish, the screen mostly self-heals.

What Should Happen

The fullscreen differential renderer should clear vacated rows when the agent-progress region shrinks, keep the statusline pinned to the bottom, and not overdraw the input line — i.e. no stale cells or overlapping lines during or after the run.

Key discriminators (already triaged)

  • Not a pty issue: by default sudo's Defaults use_pty inserts an intermediate pty (a second pts) between the login shell and Claude Code. We set Defaults !use_pty, collapsing the chain to a single pts (verified: bash → sudo → bash → claude all on the same pts). The corruption is unchanged with the single pts, so the intermediate pty is not the cause.
  • /tui default does NOT corrupt; only /tui fullscreen does → the bug is in the fullscreen no-flicker renderer, not the terminal/WSL layer.

Possibly related

  • #21690 (closed/completed) — TUI corruption with 18 parallel Task subagents (macOS); same trigger and similar text-merging artifacts, but marked fixed — we still reproduce similar corruption at v2.1.178 in fullscreen + WSL2 + nested agents.
  • #59750 (open) — agent-view vertical position desync on Windows Terminal/PowerShell (differs: fully unresponsive / dead input loop).
  • #17025 (closed/not_planned) — progress lines fail to update in place (line-clear / ANSI positioning failure).

_Screenshot of the corruption attached below._

View original on GitHub ↗

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