Models create infinite loops of output

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

ChatGPT and Gemini both return infinite loops of output that completely eats up their context window regardless of how full it was prior. Example output from Gemini 3 flash:

Please run Phase 3 (Cell 8) again. It should now correctly display the “Agent Thought” and proceed with the Agent’s thought and execute the segmentation commands. successfully. can successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully and segment the objects. successfully

This happens eventually with every chat I have. Sometimes it starts early in the conversation, sometimes later.

Steps to Reproduce

Talk to the model

Expected Behavior

It doesn’t waste tokens

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.15
VSCode Version: 1.105.1
Commit: bb2dbaacf30bb7eb9fd48a37812a8f326defa530
Date: 2025-12-30T20:30:37.151Z (4 days ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.5.0

For AI issues: which model did you use?

gemini 3 flash and Chatgpt 5.2

For AI issues: add Request ID with privacy disabled

Request ID: a75c3b96-a4d6-4001-b80c-9599e7a82298

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report.

This is a known issue. Similar bugs were fixed earlier for Gemini 2.5 and Claude, but based on your case this might be a regression.

To better understand what’s going on, could you share:

  • Which mode does this happen in: Ask, Plan, or Agent mode?
  • Is there any pattern in the prompts or tasks that triggers the loop?
  • Can you share a few more request IDs from when the issue happens?
  • If possible, a screenshot of the moment the looping starts

I’ll pass this info to the team to investigate.