[BUG] Opus 4.6 enters unbounded thinking loop and never produces edits — reading/analysis works, code modification freezes indefinitely (Windows 11 / PowerShell 7 / PyCharm plugin)
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?
When asking Claude Code to modify or write code, it consistently freezes during the thinking phase and never transitions to actually producing edits. The status indicator shows "thinking with high/max effort" with output tokens (↓) slowly accumulating, but no file writes, no visible output, and no tool calls ever occur. The freeze persists indefinitely (observed 10–30+ minutes) until the user manually interrupts.
Critically, reading and analysis work perfectly. In the same session, Claude Code can:
- Search for patterns across the project
- Read multiple files
- Analyze code and produce detailed compliance audits
- Output structured written analysis
The freeze occurs only at the transition point when Claude Code is asked to act on its analysis and begin editing files. After consuming thousands of thinking tokens over many minutes, it produces nothing.
Interrupting with Escape and prompting "Stop thinking. Make the edits now." causes Claude Code to immediately begin writing code — confirming that it had sufficient context all along and was stuck in a non-productive thinking loop.
Observed behavior pattern
- User asks Claude to analyze code → ✅ Works normally (reads files, searches patterns, outputs analysis)
- User asks Claude to fix/modify code based on its analysis → ❌ Freezes in "thinking" state indefinitely
- Output token counter (↓) slowly climbs (e.g., 4.6k → 5.7k over several minutes) but no edits appear
- No file writes, no tool calls, no visible progress
- Timer continues counting (observed 5m, 10m, 20m, 24m+)
- If user presses Escape and says "Stop thinking, make the edits now" → Claude immediately starts writing code successfully
Timestamps from actual sessions
- Session 1: "Accomplishing…" — 24m 16s, ↑ 5.6k tokens, completely unresponsive, no code modified. Had to force-close Claude Code.
- Session 2: "Zesting…" — stuck from 4m 19s (↓ 4.9k tokens) through 5m 39s (↓ 5.7k tokens) with
thinking with max effort, no output produced. - Session 3: "Nebulizing…" — 10m 8s, ↓ 4.6k tokens,
thinking with high effort, no output produced. After Escape + "Stop thinking" prompt, Claude immediately wrote 423 lines to a file and continued working normally.
What Should Happen?
Claude Code should transition from the thinking/planning phase to actually executing file edits within a reasonable time (seconds to ~1 minute). The thinking phase should not run unbounded for 10–30 minutes without producing any output or tool calls.
Error Messages/Logs
Steps to Reproduce
- Open a Python project with multiple interconnected modules (e.g., a scientific computing project with visualization, configuration, and utility modules)
- Ask Claude Code to read and analyze the codebase — e.g., "Examine the visualization code and audit it against the requirements in CLAUDE.md Section 7." This step will complete normally.
- After Claude finishes its analysis, ask it to modify the code — e.g., "Please fix the issues identified in the audit one by one and complete the code modifications."
- Observe: Claude enters "thinking with high effort" (or "max effort") state. The timer and output token counter (↓) increment, but no file writes or tool calls appear.
- Wait 10+ minutes — no edits are produced.
- Press Escape, then type: "Stop thinking. You already have all the context you need. Make the edits now, one file at a time."
- Observe: Claude immediately begins writing/editing files.
Note: The bug is most reliably triggered when asking Claude to perform multi-file edits after it has already read and analyzed substantial context. Single-file, narrowly-scoped edit requests are less likely to trigger the issue but can still freeze.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.81 (latest) and 2.1.74 (stable)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
<img width="607" height="223" alt="Image" src="https://github.com/user-attachments/assets/e2f502cd-efe3-4a9e-a725-3a19206a8b35" />
Remediation Attempts (all unsuccessful)
The following were attempted and none resolved the issue:
- Deleted
%USERPROFILE%\.claude.json - Deleted
%USERPROFILE%\.claude\history.jsonl.lock - Deleted
%USERPROFILE%\.claude\plugins\known_marketplaces.json - Set
$env:CLAUDE_CODE_DISABLE_BACKGROUND_TASKS = "1" - Downgraded Claude Code to version 2.1.74 via stable update channel
- Switched from PyCharm integrated terminal to standalone PowerShell 7
- Changed effort level from
maxtohighvia/effort high— still freezes at high effort
The only reliable workaround is manually interrupting with Escape and explicitly telling Claude to stop thinking and begin editing.
------
Environment
- Claude Code version: 2.1.74 (also reproduced on latest at time of filing)
- Model: Claude Opus 4.6
- OS: Windows 11
- Shell: PowerShell 7
- IDE: PyCharm (with Claude Code plugin), also reproduced in standalone PowerShell 7 terminal
- Platform: Anthropic API (max subscription)
------
Related Issues
- \#26224 — Claude Code hanging/freezing for 5–20 minutes, SSE events stalling
- \#26171 — Agent burns tokens endlessly in unbounded thinking loops (72.9k tokens, 21 minutes, zero output)
- \#24585 — Opus 4.6 continuously stuck in explore and thinking loops
- \#23053 — Extension freezes when generating large file content for Write/Edit tools (Windows)
- \#29287 — Claude Code frequently gets stuck in "Photosynthesizing" state
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗