Where does the bug appear (feature/product)?
Somewhere else…
Describe the Bug
When a user submits a new prompt while a previous agent turn is still generating, Cursor correctly aborts the previous turn — but the stop hook event carrying status: “aborted” is tagged with the new prompt’s generation_id, not the one that was actually aborted. A hook consumer has no way to determine which turn was cut off from the stop payload alone.
Steps to Reproduce
- Submit Prompt A in Agent mode; wait until it visibly starts working (e.g. one afterAgentThought has fired for A’s generation_id).
- While A is still running, submit Prompt B.
- Inspect the stop hook payloads.
Expected Behavior
A stop event for A’s own generation_id with status: “aborted”, then B proceeds under its own id.
Operating System
Windows 10/11
Version Information
Cursor 3.12.30
Additional Information
This issue occurs only when a follow-up message is sent before the initial response has finished generating. The stop hook incorrectly uses the generation ID of the latest follow-up prompt instead of the aborted generation.
Does this stop you from using Cursor
No - Cursor works, but with this issue