[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
Workaround ✓ Mentioned in description ↑
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
- Run claude with
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1in Terminal.app - Open the agents view (FleetView), then return to the REPL; repeat a few times
- 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.
3 Comments
+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 toCLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1/ normal-flow mode.Environment
"tui": "fullscreen";CLAUDE_CODE_ALT_SCREEN_FULL_REPAINTnot set at repro timeRepro
Symptoms after switching back
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_REPAINTon nested-subagent corruption).Can share a screenshot and test
CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1on this path if useful.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
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.