[BUG] Windows: maximizing a standalone PowerShell/cmd console window leaves a blank right margin and wraps at the pre-maximize width

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 3, 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

Closest existing issues, both of which describe a different symptom:

  • #83274 — stale content (ghosting) left on screen after a manual resize in Windows Terminal. The problem here is not leftover pixels but a wrong wrap width.
  • #58906 — duplicated/overlaid content after resize on macOS.

What's Wrong?

When Claude Code is running in a standalone PowerShell or cmd console window (the classic conhost window, not Windows Terminal) and the window is maximized with the maximize button, the TUI keeps rendering at the pre-maximize width.

The result on screen:

  • A wide blank margin appears on the right side of the window. The TUI occupies only the left portion.
  • Output wraps at the old, narrower width, so lines break at positions that do not match the visible window width.
  • Because box borders, the input area, and multi-line output all wrap at that stale width, the structure of the UI looks broken and becomes hard to read.

This is not leftover/ghosted content from a previous frame — the frame itself is drawn at the wrong width.

What Should Happen?

After the console window is maximized, the TUI should pick up the new usable width and reflow to it, so that output fills the window and wraps at the correct column.

If the underlying console host genuinely cannot report a wider width (see "Suspected cause" below), Claude Code could still detect the mismatch and either re-read the width, or surface a one-line hint telling the user how to widen the buffer.

Error Messages/Logs

N/A — visual rendering only. No error is emitted; the session continues to work, it is just laid out at the wrong width.

Steps to Reproduce

  1. On Windows, open PowerShell (or cmd) as a standalone console window — launched directly, not through Windows Terminal.
  2. Leave the window at its default size and start a session with claude.
  3. Confirm the TUI renders correctly and fills the window.
  4. Click the maximize button in the title bar.
  5. Continue the session and let Claude produce multi-line output.
  6. Observe: the right side of the maximized window stays blank, and output wraps at roughly the pre-maximize width. Box borders and the input area break at that stale column, so the layout no longer lines up with the window.

Suspected cause

The classic Windows console host (conhost.exe) treats window size and screen-buffer width as separate settings. Maximizing the window enlarges the visible area but does not necessarily widen the screen buffer, so the reported column count can stay at its previous value while the window is now much wider.

If Claude Code reads the terminal width once at startup (or reads the buffer width rather than the usable window width), that would produce exactly this symptom: correct rendering until the window is maximized, then a stale wrap width with a blank right margin.

This is consistent with the fact that the problem is reported specifically in the standalone console window, where the buffer/window split exists, rather than in Windows Terminal.

Environment

  • OS: Windows (reporter is on Windows 11)
  • Terminal: standalone PowerShell / cmd console window (conhost), not Windows Terminal
  • Claude Code: latest release as of 2026-08-03
  • Trigger: clicking the maximize button during an active session

Not yet verified by the reporter:

  • whether the same behaviour occurs in Windows Terminal, VS Code's integrated terminal, or WSL
  • whether restarting claude after maximizing restores the correct width
  • whether manually widening "Screen buffer size → Width" in the console window's Properties dialog avoids the problem

I can follow up with the exact version string and the results of the checks above if that would help narrow it down.

View original on GitHub ↗