[BUG][Windows] Adjusting terminal window size causes Claude Code to unexpectedly exit during task execution

Resolved 💬 2 comments Opened Mar 5, 2026 by hbdjzwl Closed Apr 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

What's Wrong?

Description:
When Claude Code is actively executing a task, if the user resizes the terminal window (by dragging the window edges), Claude Code unexpectedly
terminates and closes the terminal window. However, resizing the window works normally when Claude Code is in an idle state (waiting for user
input).

Environment:

  • Operating System: Windows 10 Pro 10.0.19045
  • Shell: bash (running on Windows)
  • Claude Code Version: Sonnet 4.6

Steps to Reproduce:

  1. Launch Claude Code in the terminal
  2. Execute a task that takes time to complete (e.g., running tests, building a project, using the Agent tool, etc.)
  3. While the task is executing, resize the terminal window by dragging its edges
  4. The Claude Code terminal window will immediately close

Expected Behavior:
Claude Code should remain stable and not exit due to terminal window resizing, just as it does when in an idle state.

Actual Behavior:
The terminal window closes and the Claude Code process terminates.

Additional Information:

  • This issue only occurs during task execution; resizing the window while idle works fine
  • May be related to subprocess management or terminal state handling in the bash environment on Windows

What Should Happen?

Adjusting terminal window size causes Claude Code to unexpectedly exit during task execution

Error Messages/Logs

Steps to Reproduce

Adjusting terminal window size causes Claude Code to unexpectedly exit during task execution

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.69

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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