Grok code looping forever

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The grok code is looping forever and seldom return response to me, then i have to switch to other model to proceed.
This never happen before the update in cursor.

Steps to Reproduce

Switch to grok code, and tell it to do a little complex code change, such as analyse the code and delete all the unused methods

Expected Behavior

more then 80% it will looping forever

Operating System

Windows 10/11

Version Information

Version: 2.6.18 (system setup)
VSCode Version: 1.105.1
Commit: 68fbec5aed9da587d1c6a64172792f505bafa250
Date: 2026-03-10T02:01:17.430Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.22631

For AI issues: which model did you use?

grok code

For AI issues: add Request ID with privacy disabled

69669437-75ab-41fa-8f8d-43d89a485a77

Does this stop you from using Cursor

No - Cursor works, but with this issue

also for this cfb7e7fe-c157-4402-9573-93a2cf7c2b4f

i told it to delete code, and it didn’t delete any but still respond with “succeed“

Hey, thanks for the report and the request IDs. They’re really helpful.

We’ve been seeing issues with the Grok Code model’s behavior lately, and your report matches what we’re seeing on our side. I’ve flagged this to the team. There’s no timeline yet, but your report helps us prioritize it.

For now, the best workaround is to switch to another model, like Claude or GPT. We’ll post an update here when there’s progress.

1 Like

We’re seeing the same recently (last 2 weeks maybe?) Apart from the looping, another interesting thing is we sometimes observe strings like

<xai:Readfile...

which seem to be tool calls that arent returned well by Grok resulting in failed operations within cursor.

while i have nothing definitive … pretty sure these starter around the same time we saw loops beginning

Actually just caught one :slightly_smiling_face:

request id: 64be66c4-b662-4482-8033-53f222823fb2

I have the same issue with Grok Code. It is unusable now. It tries to implement changes, make one or two and start to loop or just declare success even if there are todos left. Is there any updates on this?

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.