[BUG] Slash-command menu leaves a permanent blank region below the input after it closes (classic renderer / `CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1`)

Status Open
Reported on v2.1.210
Maintainer reply None cached
Activity 0 comments · opened Sep 3, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When the fullscreen renderer is disabled — either via /tui default or
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 — opening the slash-command autocomplete
menu expands the drawn area below the input box by the height of the suggestion
list. When the menu closes (by submitting the command or by deleting the typed
text), that region is never cleared. It stays on screen as a large blank block and
pushes the prompt up. It persists for the rest of the session, and opening the menu
again adds more blank space.

No such problem in the fullscreen renderer — it only appears once the alternate
screen is off.

This looks like the same class of bug as #76349 ("Screen ghosting when switching
between agents view and REPL with alternate screen disabled"), fixed in 2.1.210:

> Fixed returning to the agents view from a session leaving overlapping ghost
> frames with CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1

That fix covered the agents-view ↔ REPL transition. The slash-command menu teardown
path appears to have the same missing-erase problem, still present on 2.1.259.

  1. What Should Happen?(必填)

When the suggestion list closes, the lines it occupied should be erased and the
layout should collapse back to the plain prompt, with no leftover blank region.

What Should Happen?

When the suggestion list closes, the lines it occupied should be erased and the
layout should collapse back to the plain prompt, with no leftover blank region.

Error Messages/Logs

Steps to Reproduce

  1. On Windows, launch Claude Code in Windows Terminal + PowerShell 7 with the

classic renderer:

$env:CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN = '1'
claude

(Reproduces equally with settings.json "tui": "default" — the env var takes
precedence over the tui setting, so both end up on the same code path.)

  1. Have enough slash commands / skills installed that the autocomplete list is

tall — mine renders ~40 rows across built-ins, 9 plugins and user skills.

  1. Type /r (or any prefix matching many commands). The suggestion list opens

below the input and the drawn area grows by the list height.

  1. Close the menu, either way:
  • press Enter to run the command, or
  • backspace over /r until the input is empty.
  1. Look at the region below the input box — the blank block is still there.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.259

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Environment detail

  • OS: Windows 10 Pro 22H2 (10.0.19045)
  • Terminal: Windows Terminal 3001.24.11911.0
  • Shell: PowerShell 7.6.5 (pwsh)
  • settings.json → tui: "fullscreen"
  • CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN: 1 (user-level env var)
  • Enabled plugins: 9, plus a number of user skills

### Why people are on the classic renderer in the first place

Worth stating, because "just use fullscreen" is exactly what these users are
deliberately opting out of. The fullscreen renderer takes over the alternate screen
buffer, which removes the terminal's own scrollback and scrollbar and captures the
mouse wheel. Reported repeatedly:

  • #70309 — no way to seek/jump in long scrollback, native terminal scrollbar lost
  • #71491 — scrollbar not visible and copy/paste broken in interactive CLI
  • #68602 — terminal mouse reporting interferes with copy-paste and scrollbar
  • #76352 — mouse wheel captured, terminal scrollback disabled
  • #62929 (open) — feature request: add a visible scrollbar to the TUI

The bug reports above were closed as stale without a fix. So /tui default /
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 is currently the only way to get native
scrollback and scrollbar back — and this redraw bug is the cost of taking it.
Fixing the erase on menu teardown would make that path actually usable.

### Additional finding: app:redraw has no default keybinding

There is an app:redraw action registered in the Global context, but the default
keymap does not bind it to anything. The shipped Global defaults are ctrl+c,
ctrl+d, ctrl+t, ctrl+o, ctrl+shift+b, ctrl+r, ctrl+up/ctrl+down,
meta+up/meta+down, ctrl+] and the chord ctrl+k ctrl+t — no app:redraw.
(ctrl+l is taken by chat:clearInput in the Chat context; cmd+k →
chat:clearScreen is macOS-only in practice.)

So a user hitting any redraw artifact has no built-in way to force a repaint until
they discover the action name and bind it by hand.

Suggestion: ship a default binding for app:redraw — a ctrl+k chord such as
ctrl+k ctrl+r fits the existing pattern and avoids the ctrl+l conflict. It
wouldn't fix the bug, but it would give users an escape hatch for this whole family
of redraw issues.

### Workaround

Bind it manually in ~/.claude/keybindings.json:

{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{ "context": "Global", "bindings": { "ctrl+k ctrl+r": "app:redraw" } }
]
}

Then Ctrl+K Ctrl+R forces a repaint and clears the leftover region. Manual
cleanup after the fact, not a fix — the blank region still appears every time.

### Related issues

  • #76349 — same family, fixed in 2.1.210 for the agents-view path
  • #81368 — large blank gap inside the slash-command menu (different symptom,

possibly related layout-height math)

  • #83274 — terminal repaint ghosting after window resize (Windows Terminal / PowerShell)
  • #84247 — TUI resize duplicates bands of already-emitted lines into scrollback

---

View original on GitHub ↗