Agent/FleetView background-session TUI corrupts on Windows (stale-cell bottom chrome); reproduces on 2.1.177

Resolved 💬 2 comments Opened Jun 13, 2026 by rhavins Closed Jun 17, 2026

Summary

On Windows, the agent / FleetView background-session TUI (the multi-session dashboard, and any background/--agent session attached through it) corrupts its bottom chrome with stale cells: the prompt-input border, the session-name label, and the status/tip rows draw at wrong column offsets, the box collapses, and stale glyphs are never cleared. The scrollback transcript always renders correctly — only the constantly-redrawing bottom region is affected. Ctrl+L or any window resize forces a full repaint and clears it instantly, and the underlying data is always intact, so this is a pure partial-invalidation / stale-cell problem, not data loss.

This reproduces on 2.1.177 (latest), i.e. after the previously-closed issues #58579, #58925, #59008, and #59145 — so those fixes did not fully resolve the agent-view/background-attach render path.

Environment

  • Claude Code 2.1.177 (npm global)
  • Windows 11 Pro, build 26200
  • Windows Terminal Preview 1.25.1322.0 (AtlasEngine); stable WT not installed; default font, no font customization
  • PowerShell 7; multi-monitor (4 displays, mixed-DPI possible; monitors sleep/wake over multi-day uptime)
  • Node v24.x

Strongest diagnostic clue — heterogeneous background-PTY worker geometry

The daemon roster.json records background workers with different terminal geometries in the same fleet — e.g. one worker at 119x46 and another at 120x30. The FleetView dashboard attaches to these long-lived --bg-pty-host workers, and the bottom-chrome corruption is consistent with the renderer drawing against a stale/mismatched geometry rather than re-querying each worker's current size on attach/redraw.

This single mechanism explains every observed behavior:

  • Scrollback clean, only live bottom chrome corrupts — the chrome is redrawn against the wrong geometry; scrollback isn't.
  • Ctrl+L / resize fixes instantly — forces a full invalidation + geometry re-query.
  • A full reboot fixes it — destroys all workers; the fleet rebuilds with consistent geometry.
  • claude daemon stop --any fixes it without rebooting — the surgical equivalent: it terminates the transient daemon + all PTY workers, so reopening the dashboard rebuilds a clean, consistent fleet.
  • "Renders fine for days, then corrupts" — geometry divergence accumulates as sessions are opened across different monitors / window sizes / after sleep-wake, until the dashboard can no longer reconcile the mixed geometries.

Ruled out (please don't suggest these — all tested)

  • WT experimental.rendering.forceFullRepaint: true — insufficient.
  • WT experimental.rendering.software: true (WARP/CPU) — still corrupts, so it is not a GPU/rasterization issue; it's a semantic coordinate/geometry problem.
  • Env vars: CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1, CLAUDE_CODE_FORCE_SYNC_OUTPUT=1, CLAUDE_CODE_NO_FLICKER=1, CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL=1, CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 — no effect (docs indicate agent-view/background sessions always force fullscreen rendering and these don't apply).
  • /tui fullscreen / /tui screen — don't apply to background/agent sessions.
  • Windows Terminal stable → Preview migration — still corrupts on Preview 1.25.
  • Custom statusLine / Stop hooks — corruption occurs on the default-font path regardless.

Repro

  1. On Windows, start several background/--agent sessions and open the claude agents dashboard.
  2. Use it across multiple monitors / window sizes (or over a multi-day uptime with monitor sleep/wake).
  3. The bottom chrome (prompt border, session-name label, status rows) drifts/collapses with stale cells; scrollback stays clean; Ctrl+L clears it temporarily; claude daemon stop --any clears it durably.

Requested fix

Reopen and harden the agent-view / background-attach renderer so it does not trust stale per-worker PTY geometry:

  • Treat attach / resume / resize / monitor sleep-wake as full-invalidation events for the bottom chrome.
  • Re-query each background worker's actual terminal geometry on attach and before each chrome redraw, rather than reusing the roster's recorded size.
  • Clear the full bottom-chrome rectangle before redrawing it (don't rely on incremental diff for the prompt/status/tip region on Windows).
  • Optionally: a supported toggle to force full-repaint of the agent-view chrome on Windows.

Happy to provide roster.json, claude daemon status output, and a screen capture on request.

View original on GitHub ↗

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