Cursor terminal command stuck or waiting forever?

When Cursor agent mode waits on a command, the terminal may be done, blocked on input, or running a server that will never exit. Recover the work before retrying.

Do this first: check whether the command already finished. Capture terminal output, exit status if visible, changed files, and the Cursor Request ID before cancelling or rerunning.

Common terminal stuck states.

Command finished, agent still waits

Cursor may not have consumed the terminal completion state. Check for a returned shell prompt and completed output, then inspect the diff. Do not press Enter blindly: it can submit pending input or a command.

Interactive command waits forever

Commands asking for input can block the agent loop. Stop it and rerun with explicit non-interactive flags.

Long-running server command

Dev servers and watchers do not exit. Move them outside the agent turn or use a timeout.

Terminal output is hidden

Trust the shell and repository state over the chat spinner. Verify what reached disk.

Safe recovery path.

Identify the command class. Was it a one-shot command, a watcher, a server, or an interactive prompt?
Stop only the blocked process. Preserve the workspace and avoid cancelling unrelated terminal work.
Inspect the diff. Decide whether the command already produced useful files before asking Cursor to continue.
Restart with a bounded command. Add non-interactive flags, timeout, or a narrower verification command.

Separate command execution from completion detection.

In an April 2026 Cursor support discussion, support identified a shell-integration completion-detection problem: a command could finish while the agent continued waiting. This is evidence for that symptom, not proof that every terminal stall has the same cause.

In a separate terminal, use a harmless command such as git --no-pager diff --stat inside the repository to inspect changed tracked files. Do not repeat a migration, installation, or file-writing command just to test whether the spinner clears. Check untracked files separately with git status --short.

If the shell finished but Cursor did not, preserve the Request ID, Cursor version, exact command, and the Terminal and Shell Integration output logs for support. Redact secrets before sharing. If a terminal-mode setting is available, change only one setting at a time and fully restart Cursor before comparing behavior; the discussion also contains reports where changing modes did not help.

Source reviewed September 5, 2026. This diagnostic guidance is source-backed, not a claim of a reproduced Cursor fix.

What ShardStitch adds.

ShardStitch packages the command, observed output, changed files, failed terminal state, and next verification step so a fresh Cursor chat can continue without repeating the blocked command.