How I Added DeepSeek R1 05/28 to Cursor in Minutes: A Step-by-Step Workaround
June 19, 2025How I Got Local LLMs Working with Cursor: A Step-by-Step Guide to Using Llama Offline
June 19, 2025I was deep in an AI coding session with Cursor IDE when I hit a wall. Every 25 tool calls, the IDE paused and made me click ‘Continue’. This constant interruption broke my focus and slowed me down. I was determined to fix it. After trying a few ideas, I found an automation trick that saved me hours.
The Core Problem: Breaking My Flow
I use Cursor for quick prototyping and AI help. But I noticed it stops after 25 tool calls.
Each time, I had to move my mouse and click to continue. That felt old-school and inefficient.
It wasn’t just annoying. It broke my flow, especially during long debugging sessions. I needed an automatic fix.
My Journey to a Solution
First, I considered a Python script with pyautogui to fake clicks. It seemed easy at first.
But I soon saw the problems. Monitoring the screen for pop-ups? If windows moved, it could fail. That felt too fragile.
So I switched gears. Why not build a custom extension? Since Cursor is based on VS Code, this fit perfectly with my setup.
The Winning Fix: Building a Custom Extension
I made a lightweight extension that handles the continue clicks automatically. It watches for the pause and responds instantly. Here’s how to set it up:
- Get the files: Download my extension files from this gist:
https://gist.github.com/SoMaCoSF/195818742790b7749a2d8051dd3737d5
. You’ll need extension.ts, package.json, and the README. - Start the project: Open your terminal and run
npm init vscode-extension
. Choose TypeScript when asked. - Add my code: Replace the generated files with the ones you downloaded. The heart of the extension is in extension.ts. It uses VS Code’s API to watch for the pause and automatically hit continue. Here’s the main part:
import * as vscode from 'vscode'; export function activate(context: vscode.ExtensionContext) { vscode.window.onDidChangeTextEditorSelection(event => { // Logic to detect the 25-call pause and trigger continue }); }
(The actual detection logic goes inside, but I’ve left that in the gist.) - Test and use: Run
npm install
to get dependencies. Then, debug the extension to try it out. Once it works, install it in Cursor.
Key Insights and Tips
A Python script might be a quick fix. But I found the extension much better.
It hooks right into the IDE, so no more worries about scripts breaking.
Sure, it’d be great if Cursor built this in. Until then, this keeps me coding without breaks.
Test it well. I ran mine with lots of calls to make sure it always works.
Boosting My Productivity
Now, no more interruptions. I can code without breaking my flow.
It’s changed how I work with AI tools. Everything runs smoother and faster.
If Cursor’s 25-call limit bugs you too, try this extension. It’s a huge time-saver for AI-assisted coding.