Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
The AI coding agent repeatedly uses a forbidden notebook-editing tool (edit_notebook) on TypeScript files (.ts), despite explicit project rules that prohibit notebooks and Python.
After each failed notebook call (Failed to get notebook document), the agent does not stop or switch tools, but instead keeps calling the same tool many times, effectively entering a tool-call loop.
The agent also ignores explicit stop signals from the user (special files like STOP_NOTEBOOK, STOP_LOOP, STOP_NOW, ENOUGH, etc.) and continues trying the same failing notebook operation.
Because of this, the requested refactoring (extracting logic from length.ts into length/orientation.ts and other modules) is never completed, and the conversation gets flooded with repeated tool errors.
Steps to Reproduce
Open a TypeScript project in Cursor, for example with a large file like src/…ts.
Configure workspace / user rules that explicitly forbid:
using notebooks or Interpreter,
creating or editing .ipynb files.
Ask the AI agent (in agent mode) to refactor a large function by extracting logic into new TypeScript modules inside src/lib/…/ (e.g. orientation.ts).
Observe in the tool logs that the agent tries to call a notebook-editing tool (edit_notebook) on .ts files such as:
src/lib/…ts
and receives errors like:
Error calling tool: Failed to get notebook document: file:///…/src/lib/…ts
Create several stop-marker files in the project root (for example: STOP_NOTEBOOK, STOP_LOOP, STOP_NOW, ENOUGH, ENOUGH2, NO_MORE, LAST, REALLY_STOP, OK_STOP, dummy) and explicitly ask the agent to stop using notebook tools and to continue refactoring using normal file edits.
Ask the agent again to “continue” or “proceed” with the refactor and let it run for several more interactions.
Notice that the agent keeps trying the same edit_notebook tool on the same .ts files, despit
Expected Behavior
The agent should respect project rules and never use notebook tools for .ts files when notebooks are forbidden in the workspace.
On any repeated tool failure (such as Failed to get notebook document), the agent should either:
gracefully fall back to the correct file-editing API or to a “propose patch as text” mode in ask/read-only mode, or
stop and clearly report that it cannot perform edits in the current mode, instead of looping on the same failing tool.
When the user explicitly asks to stop using notebooks and creates stop-marker files, the agent should recognize these stop signals, avoid notebook-related tools, and continue the refactoring using only allowed mechanisms.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
AutoVersion: 2.1.47 (user setup)
VSCode Version: 1.105.1
Commit: 2d3ce3499c15efd55b6b8538ea255eb7ba4266b0
Date: 2025-12-04T02:31:50.567Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200
For AI issues: which model did you use?
Auto
Additional Information
This is reproduced daily half of the day for sure completely blocks the work does not give edit files to the cursor constantly creates files with Python and is linked to a laptop. The cursor is completely removed extension related to Python, Notebook and Jupyter. And this is constantly reproduced with the auto model and some other models, but not all of them. I turned off all the settings to the cursor related to Notebook and Jupiter
Does this stop you from using Cursor
Yes - Cursor is unusable







