[BUG] Screen ghosting when switching between agents view (FleetView) and REPL with alternate screen disabled

Status Fixed / completed
Reported on v2.1.202
Maintainer reply ✓ Yes — bcherny
Activity 3 comments · opened Jul 10, 2026 · closed Aug 19, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Claude Code: 2.1.202 – 2.1.206 (reproduced across versions)
  • OS: macOS (Darwin 25.5.0)
  • Terminal: Terminal.app
  • CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 (normal-flow mode)

Description

Switching between the background-agents view (claude agents / FleetView) and the interactive REPL does not fully clear the terminal buffer. Output from the two views overlaps, producing ghost renders. Data and session state are intact (purely cosmetic), but it reads as session corruption to the user and has repeatedly triggered "lost session" confusion.

Repro

  1. Run claude with CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 in Terminal.app
  2. Open the agents view (FleetView), then return to the REPL; repeat a few times
  3. Buffer shows interleaved remnants of both views

Workaround

Ctrl+L redraws correctly; resizing the window (SIGWINCH) also forces a clean redraw.

Notes

Observed on 3+ separate occasions across sessions since 2.1.202; still present on 2.1.205/2.1.206. Likely the FleetView↔REPL transition assumes alternate-screen restore instead of explicitly clearing when alt-screen is disabled.

View original on GitHub ↗

3 Comments

raykuo998 · 3 months ago

+1 — hitting the same view-switch ghosting family on Windows, but with the fullscreen renderer enabled ("tui": "fullscreen" in settings.json), so this doesn't appear specific to CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 / normal-flow mode.

Environment

  • Claude Code v2.1.207
  • Windows 11 (10.0.28000), Windows Terminal + PowerShell
  • "tui": "fullscreen"; CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT not set at repro time

Repro

  1. Interactive session; press left arrow to open the agents view ("← for agents" footer hint)
  2. Return to the conversation view
  3. Conversation rendering is corrupted from then on (happens frequently, not one-off)

Symptoms after switching back

  • Diff blocks render with misaligned/wrapped line-number gutter fragments (mid-line and at the right edge)
  • Stale frame regions not cleared; overlapping text fragments
  • Footer/status rows duplicated (e.g. bypass permissions on (shift+tab to cycle) rendered twice, stacked)

Data/session state intact — matches the "purely cosmetic but reads as session corruption" description here. Related Windows reports: #65016 (left-arrow agent view + Esc → hang/misalignment in CMD), #69619 (docs request for CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT on nested-subagent corruption).

Can share a screenshot and test CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1 on this path if useful.

bcherny collaborator · 1 month ago

Fixed in 2.1.210 — changelog: "Fixed returning to the agents view from a session leaving overlapping ghost frames with CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1" (https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md). Closing — reply to reopen if it still happens on the latest version.

🤖 Generated with Claude Code

github-actions[bot] · 5 days ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.