[BUG] CLI freezes during file Update after prolonged session in VS Code (Windows); SIGINT (Ctrl+C) ignored
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:
I am experiencing a critical issue where the claude code CLI becomes completely unresponsive after a long session of usage.
The freeze occurs specifically during an Update operation while the tool is rendering the diff (green addition lines). The UI stops updating, and the tool does not return control to the user. Most importantly, pressing Ctrl+C does not interrupt the process, requiring me to kill the terminal session entirely to exit.
Environment:
<img width="2087" height="981" alt="Image" src="https://github.com/user-attachments/assets/dd12d9fc-7b2c-4a9b-8f40-c7d416b8cf72" />
OS: Windows (based on file paths in screenshot)
Terminal: VS Code Integrated Terminal
Claude Code Version: [Enter version here if known, e.g., 0.x.x]
What Should Happen?
Option 1 (Concise)
The CLI should successfully complete the Update operation, finish printing the diff, and return control to the user by displaying the input prompt. Additionally, if the process stalls, the application should remain responsive to system signals, allowing Ctrl+C to interrupt the operation or exit the program immediately.
Option 2 (Detailed / Bullet Points)
- Successful Completion: The tool should finish rendering the file changes (the green added lines) and release the terminal lock, allowing the user to input the next command.
- Signal Handling: The application should properly handle SIGINT signals. Pressing Ctrl+C should immediately interrupt the current task or exit the CLI, even if the application is in the middle of a file operation or API call. It should not require a forced kill of the terminal window.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce:
Launch claude code in the VS Code integrated terminal on Windows.
Engage in a prolonged session with multiple file reads and updates.
Trigger a task that involves updating a file (as shown in the screenshot).
Result: The CLI hangs while printing the green diff lines. The cursor stops, and the tool ignores keyboard interrupts (Ctrl+C).
Expected Behavior:
The tool should complete the file update, display the diff, and return the prompt to the user. If it takes too long, Ctrl+C should successfully interrupt the current operation.
Additional Context:
This happens intermittently but usually after the tool has been running for a while.
The terminal process appears to be in a deadlock state.
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.7
Platform
Other
Operating System
Windows
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗