Agent session resumes automatically if stopped

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Sometimes when an agent session is stopped, it automatically gets resumed. This keeps happening until the agent finishes the work it was in the middle of when stopped or is archived.

Steps to Reproduce

  1. Start an agent session, get it working on something
  2. Stop by clicking the Stop button in chat
  3. See the agent chat mention it was stopped but the left nav still shows the agent working
  4. Agent resumes automatically

Expected Behavior

Agent should stop permanently until I prompt it again.

Operating System

MacOS

Version Information

Cursor IDE v3.21.9

For AI issues: which model did you use?

Opus 5

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Mujahid_Maqsood, thanks for the report.

What you’re seeing is two things working together. Stop ends the agent’s current turn, but any work the agent already handed off to the background (a subagent, or a long command running in a terminal) keeps running. When that finishes, it wakes the agent back up, and it carries on with what it was doing, which is why the sidebar still shows the agent as working and why it resumes on its own. That’s how Stop works today.

To make it stay stopped for now:

  1. Click Stop as usual.
  2. If a Working pill appears above the chat input, click it and choose Stop All. That stops the background subagents.
  3. If there is a Terminal pill above the input, open it and stop any command that is still running.

After that, the agent should stay idle until you send your next message. Let us know any follow-up questions!

Thanks a lot Kevin I will try this. Should the stop button actually do all of this for the user, with maybe a warning like when you are archiving a working session? This feels more intuitive.