[Bug] Agent view uses stale terminal width after window resize on Windows (ConPTY)

Status Open
Reported on v2.1.217
Maintainer reply None cached
Activity 2 comments · opened Jul 22, 2026

Bug Description
Title: Agent view uses stale terminal width after window resize on Windows (ConPTY) — not fixed by Ctrl+L Environment: - OS: Windows 11 - Terminal: Windows Terminal - Shell: PowerShell 7.6.4 - Claude Code: v2.1.217 (latest) Description: When the terminal window is resized during a session, the agent view (agent list ↔ agent detail) keeps rendering at the previous width, so text and the input-box border wrap at the old column count and the screen appears corrupted ("double" border lines, text wrapped as if the window were still its old size). Steps to reproduce: 1. Start Windows Terminal at a small window size. 2. Launch claude. 3. Maximize the window. 4. Enter the agent view and go back and forth between the agent list and an agent's detail. 5. Text/borders wrap to the small (pre-maximize) width instead of the current maximized width. The reverse also reproduces: start maximized, then shrink the window → content is laid out for the old larger width and overflows. Key findings: - Ctrl+L (repaint) does not fix it — it only redraws at the stale cached width without re-measuring the terminal. - Only an actual resize event recovers it: dragging the window edge, or shrinking-then-re-maximizing. The maximize button / launch-maximized alone does not seem to deliver a resize the agent view picks up. - This implies the agent view caches the terminal width and does not reflow when a resize event is missed or arrives late (appears specific to Windows/ConPTY resize-event delivery). Impact: Any window resize mid-session leaves the agent view visually broken until a manual edge-drag resize is performed. Not fixed by: updating to latest (v2.1.217), changing tui mode, or font/terminal changes.

Environment Info

  • Platform: win32
  • Terminal: xterm-256color
  • Version: 2.1.217
  • Feedback ID: 450a1e14-2ee2-40c4-8972-253546b4ce07

Errors

[]

View original on GitHub ↗

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