[BUG] DECSTBM renderer leaves 2-3 blank rows under the prompt on Linux (VTE / Black Box)

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

Environment

  • Claude Code 2.1.267, native binary, Linux
  • Terminal: Black Box (VTE 0.84, XTVERSION reply VTE(8401)), TERM=xterm-256color, no tmux/zellij
  • For comparison: Claude Code 2.1.268 on macOS (kitty, iTerm2, Terminal.app) does not show the problem

Bug description

Once the conversation fills the screen, the TUI stops 2-3 rows short of the bottom of the window. The blank rows sit below the last line of the bottom block (the "auto mode on (shift+tab to cycle)" hint, or the remote-control indicator when it is shown). Sometimes one more blank row is added during a session. The rows stay empty at all times, nothing is ever drawn there.

On macOS with the same setup the bottom block ends on the last row of the window.

What I ruled out

  • Terminal padding is 0. A plain shell in the same window uses every row.
  • The status line command: same gap with a different statusLine script and with the old one.
  • Environment: same gap with env -i HOME=... PATH=... TERM=xterm-256color LANG=C.UTF-8 claude.
  • LINES/COLUMNS are not set anywhere; stty size reports the real window size.
  • Other Linux terminal emulators show the same gap.

What the debug log shows

claude --debug-file prints:

XTVERSION: terminal identified as "VTE(8401)"
DECRQM(2026): status=4 → sync unsupported
DECSTBM: enabled (TMUX=unset ZELLIJ=unset TERM_PROGRAM=Black Box TERM=xterm-256color)

So the DECSTBM scroll-region renderer is active on this machine. From the bundle, it is enabled either by CLAUDE_CODE_DECSTBM or by the remote gate tengu_marlin_porch. The env var is not set here, so the gate is on. There is no env var or setting to turn the renderer off, so there is no local workaround.

The gap looks like the bottom block is laid out taller than what is actually drawn, and the extra rows are cleared instead of being given back to the content area.

Expected behavior

The bottom block should end on the last row of the terminal, as it does with the default renderer.

Related

  • #4136 (closed by the stale bot): blank space at the bottom of the terminal on Linux.
  • #83660: one unused row under tmux, a similar height reservation.

🤖 This issue was investigated and written with Claude Code.

View original on GitHub ↗