[BUG] `claude agents` sub-session renders the prompt input box off-screen on WSL despite a correct terminal size (2.1.179)

Open 💬 0 comments Opened Jun 17, 2026 by JaggerH

Preflight Checklist

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

What's Wrong?

When attaching to a session via claude agents (agent view), the alternate-screen
fullscreen renderer miscalculates viewport height and places the prompt input box
below the bottom of the visible viewport. The input box is completely invisible and
there is no in-app way to recover. The host terminal reports a correct, consistent
size, so this is purely a viewport-layout bug in the attached/agent-session renderer,
not a terminal/WSL size-propagation problem.

Environment

  • Claude Code: 2.1.179
  • OS: WSL2 (Ubuntu) on Windows 11
  • Terminal: Windows Terminal 1.24.11321.0
  • Shell: bash
  • Stack: Windows Terminal → WSL2 Ubuntu → claude, direct — no tmux, no screen, no mosh/ssh multiplexer in between (so this is not a multiplexer SIGWINCH-propagation issue)

Terminal size verified in the same pane, outside Claude Code (representative values):

$ tty
/dev/pts/0
$ stty size
57 154
$ echo "$COLUMNS $LINES"
154 57

Steps to Reproduce

  1. Launch a WSL2 interactive terminal where stty size reports a valid size (e.g. 57x154).
  2. Run claude agents and attach/enter a session.
  3. On entering the sub-session the layout collapses and the prompt input box is

rendered off-screen / not visible.

Expected

The prompt input box stays visible/pinned in agent sub-sessions, with viewport height
computed from the actual (correct) terminal size.

Actual

The input box is laid out beyond the bottom of the viewport and stays invisible until
a manual terminal resize forces a SIGWINCH full redraw, which restores it.

Notes / Workaround

  • Manually resizing the terminal window restores the input box (forces a full redraw).
  • /tui cannot be used as a workaround: it is gated to foreground sessions only

(#59145), and attached/agent sessions always use fullscreen alt-screen rendering,
so the tui setting and CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN do not apply.

Related

  • #59145 (agent-view sessions have no /tui workaround)
  • #52731 (viewport height over-reservation, fixed by a forced redraw)
  • #49086 / #6481 (resize/viewport rendering issues)

View original on GitHub ↗