[BUG] Input line renders at wrong row (stale size model?) — any window resize instantly heals it; affects both renderers

Resolved 💬 3 comments Opened Jun 12, 2026 by abaroody Closed Jun 16, 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?

During normal use, the TUI's layout drifts: typed input renders one row below
the prompt, or input echoes at the TOP of the screen instead of at the input
box. Onset is gradual/random ("creeps in"), often noticed after switching
focus between two side-by-side Claude Code instances.

Environment: WezTerm nightly (2026-03-31) on Wayland, Hyprland 0.55.3, NixOS
unstable, editorMode vim, two instances in side-by-side tiled windows.

Key evidence — points at a stale size/layout model:

  1. Any real window resize instantly heals it — a few-pixel resize of the

terminal window snaps rendering back to correct, same as Ctrl+L. No other
interaction fixes it.

  1. Reproduces on BOTH renderers — the default fullscreen renderer and

CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 (classic). Not the alt-screen
paint path; looks like shared size-tracking state.

  1. CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1 does not prevent it

consistent with the model being wrong rather than terminal content
drifting: every repaint faithfully redraws the wrong layout.

  1. Removing a custom statusline made no difference (tested with and without).
  2. Possibly relevant: in-place font-size changes (WezTerm Ctrl+=) resize the

grid without changing window geometry, leaving window height a non-integer
number of cells. Corruption does NOT appear at the moment of zoom, though.

Hypothesis: a resize/focus event is occasionally missed or mis-ordered,
leaving the renderer's terminal-size model out of sync until something forces
a re-measure (Ctrl+L or a real resize). Possibly related to #36016 and
#59163 (same redraw-recovery family) — the "real resize heals it" datum may
apply to those reports too.

Happy to run a debug build or capture logs if useful.

What Should Happen?

Typed input should render at the input box next to the prompt, and stay there
regardless of focus changes between terminal windows.

Error Messages/Logs

None — silent rendering corruption, no errors emitted.

Steps to Reproduce

No deterministic trigger found. Occurs within hours of normal use with two
instances in side-by-side tiled WezTerm windows on Hyprland/Wayland,
switching focus between them. Recovery is deterministic: Ctrl+L or resizing
the window by any amount instantly restores correct rendering.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.162

Claude Code Version

2.1.170

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗