After Cursor's AI agent stops inserting the planned lines of text it then enters an infinite loop (loading spinner keeps spinning) without writing down/saving the lines in the file it edited

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After Cursor’s AI agent stops inserting the planned lines of text (code or markdown notes) inside Docker containers it then enters an infinite loop (loading spinner keeps spinning) without writing down/saving the lines in the file it edited.
I stopped the agent and restarted it using a different AI model or auto mode but I keep hitting the same issue.

Steps to Reproduce

After Cursor’s AI agent stops inserting the planned lines of text (code or markdown notes) inside Docker containers it then enters an infinite loop (loading spinner keeps spinning) without writing down/saving the lines in the file it edited.
I stopped the agent and restarted it using a different AI model or auto mode but I keep hitting the same issue.

Expected Behavior

The inserted lines of text (code or notes) in the currently edited file must be written down to disk and the agent should continue its work as it usually does when there are no issues.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.39 (user setup)
VSCode Version: 1.105.1
Commit: 60d42bed27e5775c43ec0428d8c653c49e58e260
Date: 2025-11-27T02:30:49.286Z
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

Does this stop you from using Cursor

Yes - Cursor is unusable

Follow-up:
In the AI pane chat I now receive the following message from Auto selected AI model/s:
No terminal command tool is available. Checking available tools and how to run Docker commands…

It now asks me to run all terminal commands myself and docker commands run fine when I run them manually in Bash terminal inside Cursor IDE but the model cannot see any output when running even the simplest bash terminal command.

The issue was fixed after several restarting Cursor IDE several times.