Agent ends turn after updateTodos only — no file edits (early stopping) with BYOK GPT-5.5

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Agent stops mid-task without user pressing Stop. UI shows progress (e.g. “Worked 1m 13s”, todo 2/3, message “I will save changes to shg_visualizer.py…”) but the run ends the turn after only updating todos — no StrReplace / write / terminal tools for the actual code changes.

This is not the same as the known BYOK vision bug (multimodal → Unauthorized). Text-only Agent runs exhibit early stopping: backend appears to complete successfully (turnEnded), but work is incomplete.

Reproduced in a fresh Agent chat (not the same long thread): used an explicit prompt requiring end-to-end edits in this turn and forbidding stop after planning/todos only. Agent still explored files (~59s), stated it would edit shg_visualizer.py and shg_threejs.py, then ended the turn with no file diff. Same early stopping.

Steps to Reproduce

Steps to reproduce

  1. Cursor Settings → Models → enable OpenAI API Key + Override Base URL (Sub2API - AI API Gateway).
  2. Add custom model gpt-5.5, select it in Agent chat.
  3. Open Agent on a codebase task requiring multi-step edits (e.g. modify two Python files + run tests).
  4. Prompt example: “Please complete the modification: fix floor slab outline in shg_visualizer.py and wall material in shg_threejs.py; do not stop after planning.”
  5. Observe: Agent may update todos and print intent to edit files, then idle with “Send follow-up” — user did not click Stop.

Expected Behavior

Agent should continue tool calls (read/write files, run tests) until todos are complete or a real blocker occurs.

Operating System

Windows 10/11

Version Information

Cursor version: 3.6.31 ([email protected], Electron 39.8.1)
OS: Windows 10.0.26200 (x64)
Mode: Agent
Account: Pro Plan

For AI issues: which model did you use?

Model: gpt-5.5 (Medium) via Bring Your Own Key (BYOK)
OpenAI Override Base URL: Sub2API - AI API Gateway (OpenAI-compatible third-party gateway; text + tool calls work; not the issue here)

For AI issues: add Request ID with privacy disabled

1087477e-08b5-4024-a713-b43ae7401fb6
Primary report: local telemetry shows only updateTodosToolCall then turnEnded (~48s), model gpt-5.5, prompt ~164 chars

Additional Information

Actual behavior

  1. Agent updates todos (updateTodosToolCall) and sometimes shows planning text.
  2. Turn ends (turnEnded) with no file-edit tools executed for the stated work.
  3. User must manually send follow-up repeatedly; same pattern can recur in the same thread.
  4. No Unauthorized error in these runs (unlike attaching images with BYOK — separate confirmed bug).

Workarounds tried

  1. Explicit prompt in a new Agent chat: “must finish edits and verification in this round; do not stop after planning or updating todos only” — still stops after exploration/plan text, no diff.
  2. Explicit prompt: “complete end-to-end, do not stop after exploration” — still stops after todos/plan.
  3. Direct API to gateway (PowerShell chat/completions) works — not a gateway issue.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. The Request ID and steps really helped. I see two separate things here.

  1. Early stopping. The fact that GPT-5.5 ends the turn after updating todos and the plan text, without getting to actual file edits, is a known behavior pattern of the model itself. It’s the model deciding to stop with a short turn, not a failure of the agent loop in Cursor. We’re tracking it, but I can’t share an exact fix timeline. Prompts like “do not stop after planning” can help sometimes, but not reliably. It’s a model behavior limitation.

  2. BYOK routing. Based on your Request ID, it looks like GPT-5.5 requests aren’t actually going through your custom gateway sub2api.sxsong.online, even though your direct API call works. There was a known issue where the BYOK key was ignored specifically for GPT-5.5, and the request was served without your key. This was fixed recently, but the fix might not have made it into 3.6.31 yet.

What I’d suggest checking:

  • Update Cursor to the latest version and retry the same steps.
  • After updating, confirm that GPT-5.5 is now going through your gateway. You should be able to see incoming requests from Cursor in your gateway logs.

If BYOK starts routing correctly but early stopping remains, then it’s just the model behavior from point 1. Send a new Request ID after the update and we can dig in further.