[BUG] Claude Code Freezes When Generating Code (Turns Red, No Tokens)
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?
Claude Code freezes when generating code.
It analyzes the project correctly, but as soon as it starts producing code, the interface turns red and then completely stops responding.
There are no inbound or outbound tokens, no error message, and no visible feedback. It remains stuck indefinitely.
What Should Happen?
Claude Code should generate code normally after completing its analysis.
Token activity (inbound and outbound) should continue as expected, and the generated code should appear in the editor without the interface freezing or turning red.
Error Messages/Logs
There are no visible error messages.
No logs are displayed in the interface.
When the issue occurs, the interface turns red and token activity stops (no inbound or outbound tokens), but no explicit error message is shown.
Steps to Reproduce
- Open Claude Code.
- Open any project (the issue happens on all projects, including simple ones).
- Ask Claude to generate or modify code (for example: “Create a simple Express server” or “Refactor this function”).
- Claude analyzes the code normally.
- When it starts generating code, the interface turns red.
- Token activity immediately stops (no inbound or outbound tokens).
- The interface remains frozen indefinitely.
The issue does not depend on specific files or project content.
It happens even on a minimal project with a single index.js file containing:
console.log("Hello world");
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.41 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Powershell and WSL
Additional Information
- The issue happens on multiple environments: Windows native, WSL, and any other setup I tried.
- Deleting the entire
.claudefolder and logging back in does not fix the problem. - Restarting the application does not resolve the freeze.
- The interface turns red when generation starts, but no error messages or logs are produced.
- Happens on any project, even minimal ones (e.g., a single
index.jsfile withconsole.log("Hello world");). - Screenshot attached showing the red interface during freeze.
<img width="464" height="57" alt="Image" src="https://github.com/user-attachments/assets/c68a3b0f-9190-48d5-bcdb-c1dafda76b07" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗