Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
A background subagent (eaf97832-7e06-4ff2-a055-47ee15f2546b) showed its final report in the UI by about 21:20 UTC. The transcript at agent-transcripts//subagents/.jsonl still ended on a mid-review assistant sentence with no turn_ended. The final report and {“type”:“turn_ended”} were written together at 21:25:41.370Z. The parent’s completion wakeup was queued at 21:25:41.374Z, so the parent learned of completion about five minutes (possibly longer) after the UI showed it. The writer (subagent-transcript-writer) rewrites the whole file at each checkpoint, stores only user and assistant text and tool_use (no tool results), and does not wait for the checkpoint write. A running slice-verifier left its file untouched for 20+ minutes while its pytest terminal output kept growing. Expected: flush at each completed assistant step; include the final message and turn_ended in a flush that completes before the UI shows the turn as finished. Also: the docs say background subagents write to ~/.cursor/subagents/, which does not exist here, and subagentStop reportedly never fires for background subagents (forum report linked from the diagnostic).
Steps to Reproduce
Starting nested subagents as part of a dev stack
Expected Behavior
as soon as a subagent finishes, a waiting parent is notified
Operating System
Linux
Version Information
Cursor agent host build b1aa50cb6db84fd3e8c808259cb172ea73425c10 (module b951911e4476, publish version 316), Remote/devcontainer.
Does this stop you from using Cursor
No - Cursor works, but with this issue