Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On Windows, Cursor’s foreground shell can continue to show a PowerShell command as “running” for several minutes after the script has already completed successfully.
The script in question is a long-running PowerShell orchestration/CI script that:
- runs for about 1 minute,
- launches several native child processes sequentially,
- streams mixed progress output,
- has some quiet periods,
- writes a final report/result file near the end,
- prints a final summary line,
- exits with code 0.
Observed behavior:
- the script finishes its actual work in about 48-66 seconds;
- the final report file is already written with a valid completion timestamp;
- the final summary line is already printed;
- no relevant worker processes appear to remain active;
- but Cursor’s foreground shell still does not return control and continues to treat the command as running until I manually interrupt it several minutes later.
The same command completes normally when started in background mode. This makes it look like a foreground shell completion-detection problem in Cursor, not an actual hang inside the PowerShell script itself.
I do not yet have a guaranteed minimal standalone repro script, but the behavior appears tied to longer PowerShell scripts that orchestrate multiple native child processes and then exit normally.
Steps to Reproduce
- Use Cursor on Windows with PowerShell 7.6.0 as the shell.
- Run a long-running PowerShell script in the foreground shell. The script should:
- run for roughly 1 minute,
- launch multiple native child processes,
- print status/progress output over time,
- include some silent periods,
- write a final report/result file,
- print a final completion line,
- exit with code 0.
- Wait until the script has clearly finished its work:
- the final report/result file has been written,
- the final completion line is already visible in the shell output.
- Observe that Cursor still keeps the foreground shell command in a running state and does not return the prompt.
- Wait several more minutes.
- Observe that the command still appears stuck until it is manually interrupted.
Important note:
- Running the same command in background mode does not show the problem.
- Very short or simple PowerShell commands may not reproduce it.
- The issue seems to require a longer PowerShell script that manages native child processes and then exits normally.
Expected Behavior
Once the PowerShell script has finished its work, printed its final output, written its final report/result file, and exited with code 0, Cursor should immediately mark the foreground shell command as completed and return control to the user.
Cursor should not keep the foreground command in a running state for several additional minutes after the script has already finished.
Operating System
Windows 10/11
Version Information
Version: 3.4.1 (system setup)
VSCode Version: 1.105.1
Commit: 2a298dd06944a9b9ea541d28225b779fcbcc6200
Date: 2026-05-08T16:05:07.818Z
Layout: editor
Build Type: Stable
Release Track: Nightly
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.22631
For AI issues: which model did you use?
GPT-5.4 XHigh, Composer 2
For AI issues: add Request ID with privacy disabled
RID: 7530556e-9dc5-4ab9-a0d9-33f6671ce2b8
Additional Information
[human text]
It looks like the agent’s shell tool is freezing. The problem is somewhere around the control return. Moreover, it’s impossible to send such a frozen terminal to the background. And if you leave it for several dozen minutes, it will disappear from the chat altogether, with the Agent in the “continuing operation” status.
I asked GPT-5.4 make a PoC, but the PoC doesn’t hang like that.
Does this stop you from using Cursor
Yes - Cursor is unusable