AI Editor stuck on generating 2 lines

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Code generation using Cmd+K gets stuck on “Generating …” after two lines when using Edit Selection. Single line generation, like asking Cursor to print hello world, still works. Code generation hangs for all tasks I’ve tried that require more than 2 lines of generation.

Steps to Reproduce

Code generation hangs after two lines on all .py and .ipynb files I tried.
I’ve tried completely clearing app data and redownloading Cursor but it did not fix the bug.

Expected Behavior

Supposed to complete generation and ask to Accept or Reject. Instead, it is stuck on “Generating…”.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.4.21
VSCode Version: 1.105.1
Commit: dc8361355d709f306d5159635a677a571b277bc0
Date: 2026-01-22T16:57:59.675Z (12 hrs ago)
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 23.4.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This is a known issue and the team is aware. There’s a similar report, especially for .ipynb files.

To help with debugging, can you share:

For now, let’s focus on this:

  1. Console logs: Open Cmd+Shift+P > Developer: Toggle Developer Tools > the Console tab. Then reproduce the bug (Cmd+K, let it get stuck on “Generating…”) and copy everything that shows up in red or looks like an error.

  2. Network Diagnostics: Go to Cursor Settings > Network > Run Diagnostics. Run it and send a screenshot of the results.

  3. Model: Check Cursor Settings > Features > Inline Edit and see which model is selected. Try switching to another one, like from Claude to GPT or the other way around.

Let me know what the logs show.

Thanks for the response! Here’s what I see:

  1. I don’t seem to see a Features tab in Cursor Settings, but when I look directly from Cmd+K I can’t choose any of the models other than Auto: this isn’t an issue when using Cmd+L though.

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