Repository navigation
[Bug] Agent view uses stale terminal width after window resize on Windows (ConPTY) #80123
Description
Activity
Same Issue described above. If you go back to small screen and drag the edges back to full screen it will render correctly again. Did for me anyway..
Still hitting this on Claude Code 2.1.232 (latest as of 2026-08-14), on Windows Terminal, with
CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1already set.Symptoms:
- Input box renders at a stale cached width. Typed text gets cut/wrapped incorrectly (e.g. "give me like a large amount of text on the screen" shows as just "the screen" on its own line).
- Cursor draws in the wrong position, floating mid-line instead of at the actual text insertion point.
- Status line (token count / mode indicator) renders misaligned relative to the input box border.
- Click-drag text selection highlights the wrong lines relative to what's visually there.
- Only fix: manually drag-resize the terminal window, which forces a real SIGWINCH and triggers a correct re-measure/redraw. Ctrl+L does not help.
This suggests full-repaint mode isn't sufficient on its own, since it just redraws at the same (wrong) cached width rather than re-querying actual terminal dimensions.
Environment:
- Claude Code 2.1.232
- Windows Terminal (Windows 11 Pro 10.0.26200)
- PowerShell 7
CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1set
- addedarea:agent-viewclaude agents TUI / --bg / FleetView / daemon bg sessionsclaude agents TUI / --bg / FleetView / daemon bg sessions
on Aug 26, 2026 Claude generated (obviously)
Same issue here. Every time I switch to another agent in agent view, the drawing area shrinks while the window stays maximized, and typed input becomes invisible.
Resizing the window (Win+Down / Win+Up) fixes the current agent, but the problem comes back on the next switch, so the stale size seems to be re-applied on attach.
~/.claude/daemon/roster.json shows workers spawned with different sizes (155x42 to 209x51).- Claude Code 2.1.276
- Windows 11 Pro 10.0.26200
- Windows Terminal 1.24.11911.0
- Windows PowerShell 5.1.26100.8972
- settings.json: "tui": "fullscreen"
Still happening on Claude Code 2.1.286, Windows 11 Pro 10.0.26200, Windows Terminal 1.24.11911.0, PowerShell, fullscreen renderer.
Symptoms after resizing the window and switching between agents in agent view:
- the input cursor is drawn in the wrong place
- typed text shows up in the status line instead of the input box
- Ctrl+L doesn't fix it
- any real window resize fixes it right away (even a few pixels, or Win+Down / Win+Up)
~/.claude/daemon/roster.jsonshows my workers were spawned at two different sizes, matching the window size when each session started:workers dispatch cols x rows 4 209 x 58 2 187 x 70 So it looks like the size from spawn time comes back when I attach to a worker, and nothing corrects it until the next real resize.
Reacted by Kirk and Muhammad Rafay NadeemAlso seeing this on Claude Code 2.1.295, Windows 11 (10.0.26300), Windows Terminal 1.24.12741.0, Windows PowerShell 5.1. Rows overlap and stale text stays in agent view until a real resize; Ctrl+L doesn't help. Reproduces with
compatibility.textMeasurementset to bothgraphemesandwcswidth.~/.claude/daemon/roster.jsonshows workers spawned at mixed sizes (120×30, 143×48, 145, 154, 209 cols), consistent with the stale-geometry-on-attach theory above.
Bug Description
Title: Agent view uses stale terminal width after window resize on Windows (ConPTY) — not fixed by Ctrl+L
Environment:
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:
The reverse also reproduces: start maximized, then shrink the window → content is laid out for the old larger width and overflows.
Key findings:
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
Errors