claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Windows Terminal/WSL: tui input box rendering corrupted - extends beyond terminal width boundaries

Open salah9003 opened this issue 1 year ago • 2 comments

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?

Terminal input box rendering is corrupted - the input prompt extends beyond the terminal width boundaries and appears visually broken. The input area does not respect terminal column limits and overlaps with terminal edges.

Image

What Should Happen?

Input box should be properly contained within terminal width boundaries

Error Messages/Logs

strace output shows duplicate ANSI cursor control sequences:
write(20, "\33[?25h", 6) = 6        # Show cursor
write(20, "\33[?25h", 6) = 6        # Show cursor AGAIN (duplicate)

v1.0.110 working version shows:
write(20, "\33[?25h", 6) = 6        # Show cursor once (clean)

Steps to Reproduce

  1. Open PowerShell in Windows Terminal
  2. Run claude command
  3. Observe the welcome screen and input box rendering

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

1.0.110

Claude Code Version

1.0.111

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Root cause:

Terminal state management regression in v1.0.111. strace analysis shows duplicate ANSI cursor control sequences (\33[?25h sent twice) causing corruption. this breaks width boundary calculations for input box rendering.

technical details: trust dialog introduced synchronized output mode (\33[?2026h) combined with duplicate cursor commands corrupts terminal state restoration.

retelated issues: #7435, #5679, #1509, #4897

salah9003 avatar Sep 11 '25 13:09 salah9003

I don't believe that this is a bug but a change in the input field design to make copy/pasting easier.

chrislloyd avatar Sep 11 '25 18:09 chrislloyd

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Sep 19 '25 14:09 github-actions[bot]