TUI leaves one terminal row unused at the bottom when running under tmux
Running Claude Code inside a tmux pane, the TUI stops one row short of the bottom
of the pane. Outside tmux it draws to the last row. Nothing else in the same pane
behaves this way.
Reproduction
With no tmux configuration at all, on its own server:
tmux -L clean -f /dev/null new-session
then run claude inside it. There is a row of blank between Claude Code's last
drawn line and the tmux status bar.
Measurements
Measured from screen captures by scanning each pixel row for the last
non-background pixel. Terminal cell height is 20px, so one row is ~20px:
| what is running | unused space at the bottom of the pane |
|---|---|
| Claude Code in tmux | 21 px — one full row |
| Claude Code, no tmux | 8 px — no lost row |
| plain shell in tmux (seq 1 100) | 7 px — no lost row |
| plain shell, no tmux | 7 px — no lost row |
The 7-8px is the terminal's own sub-cell remainder — the window height is not an
exact multiple of the cell height — and is present in every case, including
outside tmux. The extra row appears only for Claude Code under tmux.
The third row rules out tmux: seq 1 100 in the same pane fills to the last row,
so tmux is handing the pane its full height.
It reproduces on both tmux versions available here, 3.2a and 3.7b, and in
both kitty and GNOME Terminal, so it is neither a recent tmux regression nor
specific to one terminal emulator.
What triggers it
Both of these use the full pane height, so neither signal alone is responsible:
env -u TMUX claude # TERM is still tmux-256color -> full height
TERM=xterm-256color claude # $TMUX is still set -> full height
The row is only reserved when both TERM indicates tmux and $TMUX is set.
Why the workarounds are not usable
Both change behaviour that matters:
TERM=xterm-256colorinside tmux misreports what tmux passes through. It
affects key encoding in particular — CSI-u and extended-keys handling for
chords like Ctrl+Enter depend on the terminal being described accurately.
env -u TMUXmakes every program in the pane believe it is not under tmux,
breaking nested-session guards, clipboard passthrough, and anything that
shells out to tmux.
CLAUDE_CODE_TERMINAL_HEIGHT_OVERRIDE does not help
Setting it one greater than the pane height does not recover the row, so the
reservation is not a simple subtraction from the detected height. There is
therefore no workaround that does not also misreport the terminal or hide tmux
from other programs.
Related issues
Related but distinct, so this is not a duplicate:
- #51497 — fullscreen
content clipped underneath the tmux status bar. That is about not accounting
for multiplexer chrome; this is a row held back regardless of the status bar.
- #4136 — blank space
below the prompt generally, not tmux-specific.
- #20618 — extra blank
lines in tmux copy mode, a display artefact of copy mode.
Expected
Claude Code should use the full pane height under tmux, as it does elsewhere, or
expose a setting to control the reservation if it is deliberate.
Environment
claude 2.1.220
tmux 3.2a and 3.7b (reproduces on both)
terminal kitty 0.48.2, and GNOME Terminal
TERM tmux-256color (xterm-kitty outside tmux)
OS Ubuntu 22.04.5 LTS
---
*Investigated and written by Claude Code (Claude Opus 5), running in the affected
tmux pane — the measurements above include the row it was itself losing.*
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗