VSCode extension hangs/loops on complex multi-step tasks
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?
Environment
- Claude Code version: 2.1.11
- VSCode version: [请填写你的版本]
- OS: macOS (Darwin 24.2.0)
- Model: claude-opus-4-5-20251101 (also tested with other models)
Description
The VSCode extension hangs or enters a loop when processing complex multi-step tasks, while simple tasks work normally.
Symptoms
- Model repeatedly outputs the same text
- Gets stuck at "Spelunking..." status
- Appears to be in a "thinking loop" - generating reasoning but not executing tool calls
- Eventually times out or requires manual interruption
Reproduction Steps
Tasks that work normally:
- Simple greeting:
hello→ responds correctly - Simple command:
run ls→ executes correctly - Reading small files:
read config.py→ works fine - Reading large files:
read docs/TECHNICAL_DOCUMENTATION.md→ works (shows summary) - Simple questions:
what does this project do?→ responds correctly
Tasks that hang/loop:
- Code modification based on feedback:
Based on my usage feedback, please modify the code: [detailed feedback]
- Generating comprehensive documentation:
Generate detailed technical documentation based on the current project
Expected Behavior
The extension should process complex tasks by breaking them into steps and executing tool calls sequentially.
Actual Behavior
The extension enters a loop state where it:
- Repeatedly outputs partial responses
- Shows "Spelunking..." but doesn't progress
- Fails to execute tool calls
- Requires manual cancellation (Escape/Ctrl+C)
Diagnostic Findings
- No custom hooks configured
- No MCP servers configured
- Issue persists after:
- Opening new window
- Disabling think mode
- Starting fresh conversation
- Simple tasks in the same session work fine, confirming API/network is not the issue
Workaround
Breaking complex tasks into smaller manual steps works, but this defeats the purpose of autonomous task handling.
Screenshots
<img width="612" height="829" alt="Image" src="https://github.com/user-attachments/assets/81bc6078-b47c-4c84-9dcf-43b5ddc69836" />
<img width="786" height="472" alt="Image" src="https://github.com/user-attachments/assets/570cfa39-87fd-47d3-927e-a93fc8bfc1c9" />
<img width="891" height="411" alt="Image" src="https://github.com/user-attachments/assets/a0c53ef2-0781-4632-8a99-f4b6ae56dd39" />
What Should Happen?
Environment
- Claude Code version: 2.1.11
- VSCode version: [请填写你的版本]
- OS: macOS (Darwin 24.2.0)
- Model: claude-opus-4-5-20251101 (also tested with other models)
Description
The VSCode extension hangs or enters a loop when processing complex multi-step tasks, while simple tasks work normally.
Symptoms
- Model repeatedly outputs the same text
- Gets stuck at "Spelunking..." status
- Appears to be in a "thinking loop" - generating reasoning but not executing tool calls
- Eventually times out or requires manual interruption
Reproduction Steps
Tasks that work normally:
- Simple greeting:
hello→ responds correctly - Simple command:
run ls→ executes correctly - Reading small files:
read config.py→ works fine - Reading large files:
read docs/TECHNICAL_DOCUMENTATION.md→ works (shows summary) - Simple questions:
what does this project do?→ responds correctly
Tasks that hang/loop:
- Code modification based on feedback:
Based on my usage feedback, please modify the code: [detailed feedback]
- Generating comprehensive documentation:
Generate detailed technical documentation based on the current project
Expected Behavior
The extension should process complex tasks by breaking them into steps and executing tool calls sequentially.
Actual Behavior
The extension enters a loop state where it:
- Repeatedly outputs partial responses
- Shows "Spelunking..." but doesn't progress
- Fails to execute tool calls
- Requires manual cancellation (Escape/Ctrl+C)
Diagnostic Findings
- No custom hooks configured
- No MCP servers configured
- Issue persists after:
- Opening new window
- Disabling think mode
- Starting fresh conversation
- Simple tasks in the same session work fine, confirming API/network is not the issue
Workaround
Breaking complex tasks into smaller manual steps works, but this defeats the purpose of autonomous task handling.
Screenshots
<img width="612" height="829" alt="Image" src="https://github.com/user-attachments/assets/81bc6078-b47c-4c84-9dcf-43b5ddc69836" />
<img width="786" height="472" alt="Image" src="https://github.com/user-attachments/assets/570cfa39-87fd-47d3-927e-a93fc8bfc1c9" />
<img width="891" height="411" alt="Image" src="https://github.com/user-attachments/assets/a0c53ef2-0781-4632-8a99-f4b6ae56dd39" />
Error Messages/Logs
Steps to Reproduce
Environment
- Claude Code version: 2.1.11
- VSCode version: [请填写你的版本]
- OS: macOS (Darwin 24.2.0)
- Model: claude-opus-4-5-20251101 (also tested with other models)
Description
The VSCode extension hangs or enters a loop when processing complex multi-step tasks, while simple tasks work normally.
Symptoms
- Model repeatedly outputs the same text
- Gets stuck at "Spelunking..." status
- Appears to be in a "thinking loop" - generating reasoning but not executing tool calls
- Eventually times out or requires manual interruption
Reproduction Steps
Tasks that work normally:
- Simple greeting:
hello→ responds correctly - Simple command:
run ls→ executes correctly - Reading small files:
read config.py→ works fine - Reading large files:
read docs/TECHNICAL_DOCUMENTATION.md→ works (shows summary) - Simple questions:
what does this project do?→ responds correctly
Tasks that hang/loop:
- Code modification based on feedback:
Based on my usage feedback, please modify the code: [detailed feedback]
- Generating comprehensive documentation:
Generate detailed technical documentation based on the current project
Expected Behavior
The extension should process complex tasks by breaking them into steps and executing tool calls sequentially.
Actual Behavior
The extension enters a loop state where it:
- Repeatedly outputs partial responses
- Shows "Spelunking..." but doesn't progress
- Fails to execute tool calls
- Requires manual cancellation (Escape/Ctrl+C)
Diagnostic Findings
- No custom hooks configured
- No MCP servers configured
- Issue persists after:
- Opening new window
- Disabling think mode
- Starting fresh conversation
- Simple tasks in the same session work fine, confirming API/network is not the issue
Workaround
Breaking complex tasks into smaller manual steps works, but this defeats the purpose of autonomous task handling.
Screenshots
<img width="612" height="829" alt="Image" src="https://github.com/user-attachments/assets/81bc6078-b47c-4c84-9dcf-43b5ddc69836" />
<img width="786" height="472" alt="Image" src="https://github.com/user-attachments/assets/570cfa39-87fd-47d3-927e-a93fc8bfc1c9" />
<img width="891" height="411" alt="Image" src="https://github.com/user-attachments/assets/a0c53ef2-0781-4632-8a99-f4b6ae56dd39" />
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.11
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗