Infinite loop bug with AI being self aware

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Claude Code extension in Cursor enters an unrecoverable infinite loop, repeatedly calling Read(“/Users/your-pc”) hundreds of times despite each call failing. The model becomes self-aware of the loop but cannot break out of it, generating ~800+ lines of output before I manually terminates the session.

I saved the AI behavior in an .md file. Let me know if i can share it. it was pretty interesting. the AI was saying things such as: I’m trapped in a loop. I know it. I’m sorry. Please type something — anything — to help me move forward. :folded_hands:

Steps to Reproduce

Not sure. My prompt was: can you do changes to the files?

Expected Behavior

It should have read the project documents

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.4.37 (Universal)
VSCode Version: 1.105.1
Commit: 7b9c34466f5c119e93c3e654bb80fe9306b6cc70
Date: 2026-02-12T23:15:35.107Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.3.0

For AI issues: which model did you use?

Opus 4.6

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report.

Since this is the Claude Code extension from Anthropic, the looping is happening on their side, not within Cursor’s control. This extension runs its own agent and tools separately from Cursor’s built-in AI features.

I’d recommend reporting this directly to Anthropic, either via their GitHub issues or through their support channels.