Terminal command runs by agents are stuck in endless loop

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Terminal command runs are not quitting automatically after completion.

Steps to Reproduce

Just run any command and check if it is proceeding to next steps.

Expected Behavior

It should proceed to next step if the terminal command is completed.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.77 (Universal)
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0
Date: 2025-11-13T23:10:43.113Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Auto

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @abhishek_tatikella, from what I am seeing on the screenshot, the build finished in about 3.96s, but the Cursor Agent isn’t detecting that it’s done. Let’s try these steps to narrow down the problem:

  1. Run npm run build in a regular terminal and verify it exits cleanly.
  2. Check your package.json build script for any --watch flags or background processes that keep it alive.
  3. If the problem persists, run the underlying command directly (e.g. npx vite build, replace with your build tool if it’s not vite) instead of using npm run.

Let me know how that works, and we’ll pick it up from there.

I’ve uninstalled and installed the cursor, and for some reason this got resolved.

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