Parent agent reports task complete while subagents still have pending actions

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I ran a coding task where the main Cursor agent spawned multiple subagents. The main agent completed the task, integrated/committed the subagents’ work, ran validation, and returned a final completion report. Later, I noticed two of the earlier subagents were still shown as running/pending and had commands awaiting permission.
This was confusing because I reasonably assumed that once the parent agent reported the task as complete, all child-agent activity associated with that task had also completed or terminated.
Concern: If subagents share the same working tree, it is unclear whether a delayed/pending subagent could resume after the parent task has completed and modify files based on stale repository state. For coding workflows, this creates a potential repository-integrity/concurrent-write risk.
Expected behavior: Before the parent agent reports completion, it should either wait for all spawned subagents to reach a terminal state, cancel remaining subagents, or clearly warn that child agents/permission requests are still pending.
Ideally the UI should also clearly show: All subagents completed, 2 subagents still running, or 1 command awaiting permission.

Steps to Reproduce

  1. Start a coding task in Cursor Agent that is large enough for the parent agent to delegate work to multiple subagents.
  2. Allow the subagents to modify files and run commands in the same repository/worktree.
  3. During execution, allow some subagent commands, but leave at least one command awaiting user permission.
  4. Let the parent agent continue working and integrate the subagents’ completed changes.
  5. Allow the parent agent to run its validation/tests and return a final completion report indicating that the task is finished.
  6. Start another task or continue working in the same repository based on the assumption that the previous task and its subagents are finished.
  7. Check the previous task’s subagents.
  8. Observe that one or more subagents from the already-completed parent task may still be shown as running or have commands awaiting permission.
  9. Approving the delayed permission can cause the old subagent to resume activity even though the parent task has already reported completion and newer work may already exist in the same worktree.
    Actual result: The parent task can report completion while child subagents still have pending/running actions. It is unclear whether those subagents can later modify the repository using stale context.
    Expected result: Before reporting the parent task as complete, Cursor should either wait for all subagents to reach a terminal state, cancel outstanding subagents, or clearly warn that subagents/permission requests are still active. Ideally, old subagents should not be able to resume and modify the shared worktree after the parent task has been finalized without an explicit warning.

Operating System

MacOS

Version Information

Version: 3.17.21
VS Code Extension API: 1.128.0
Commit: 8f2a112cb2845a97b75fd932ea5c470579ca4060
Date: 2026-08-25T01:05:08.089Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 25.2.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @andsien, thanks for the detailed report.

When the main agent finishes its final response, background subagents it spawned are not cancelled. If one is still waiting on a permission prompt it stays alive, and approving that prompt later will resume it, and it can still modify files in the same working tree. So if the task is already done, the safer move is to stop those subagents from the agents list rather than approve them.

The visibility side is a known issue we’re already tracking: the main conversation and the agents badge don’t clearly surface that a subagent is blocked on an approval. An upcoming update (3.18) also keeps the parent chat showing as working while its subagents are still running, so a finished-looking chat with live children should become much rarer.

Thanks Colin, that clears it up. My main concern is really the visibility rather than the fact that subagents continue running in the background.

I did notice that Cursor shows something like “2 subagents still running” above the chat box, but the text is quite small and easy to miss, especially after the main agent has already returned a detailed completion report. I also don’t think it’s immediately obvious to users that those subagents are still active and may still modify the working tree.

I think it’s fine for subagents to continue running, but their state should be much more prominent when the parent finishes — especially if one is waiting for permission. Something like “Task completed, but 2 subagents are still active” or “1 subagent is awaiting permission” would make the state much clearer.

The 3.18 change you mentioned sounds like it should help with this. Thanks for confirming the behavior and that the visibility issue is already being tracked.