subagentStart hook: parent_conversation_id always equals conversation_id, and subagent conversations have no link back to their parent

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hooks provide no way to associate a subagent’s conversation with the parent conversation that spawned it.

Two related problems (Cursor IDE 3.7.27, macOS):

1. subagentStart fires under the parent’s conversation, with a self-referencing parent id. The docs imply this hook describes the subagent’s new conversation, but in practice conversation_id == parent_conversation_id — so the field adds no information:

{
  "hook_event_name": "subagentStart",
  "conversation_id": "955a0282-ab19-40f3-8074-930fe44e6251",
  "parent_conversation_id": "955a0282-ab19-40f3-8074-930fe44e6251",
  "subagent_id": "tool_f11bf24d-1575-49ed-819d-dc51f100be9",
  "tool_call_id": "tool_f11bf24d-1575-49ed-819d-dc51f100be9",
  "subagent_type": "shell",
  "subagent_model": "...",
  "session_id": "955a0282-ab19-40f3-8074-930fe44e6251",
  "generation_id": "955a0282-ab19-40f3-8074-930fe44e6251"
}

(subagent_id is just the parent’s Task tool_call_id; session_id and generation_id also just repeat the conversation id. Same for subagentStop.)

2. The subagent’s own hooks carry no linking field at all. The subagent then runs under a fresh conversation_id (here 3209bc72-…), and its preToolUse/postToolUse payloads contain nothing referencing the parent: session_id == conversation_id (its own), generation_id is a fresh UUID, transcript_path is null, and the spawning tool_call_id appears nowhere.

Steps to Reproduce

  1. Subscribe a hook script to subagentStart, preToolUse, postToolUse that dumps stdin to a file.
  2. In a chat, ask the agent to perform a task using a subagent (Task tool).
  3. Compare the subagentStart payload with the subagent’s preToolUse payloads: there is no shared identifier linking the child conversation to the parent.

Expected Behavior

Either of:

  • subagentStart includes the subagent’s (new) conversation_id as a distinct field, or fires under the subagent’s conversation with parent_conversation_id pointing at the actual parent — as the field name suggests; or
  • hooks fired inside a subagent conversation include parent_conversation_id (and ideally subagent_id/subagent_type).

This matters for observability/security tooling built on hooks: without a linkage, one user conversation that uses N subagents appears as N+1 unrelated conversations, and there is no way to reconstruct the session tree. (Claude Code’s hooks handle this by keeping the parent session_id on subagent hooks and adding agent_id/agent_type.)

Operating System

MacOS

Version Information

IDE:
Version: 3.7.27
VS Code Extension API: 1.105.1
Commit: e48ee6102a199492b0c9964699bf011886708ba0
Date: 2026-06-10T01:46:16.942Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

About Cursor CLI

CLI Version 2026.06.11-03-15-00-241fc09
Model Composer 2.5 Fast
Subscription Tier Free
OS darwin (arm64)
Terminal apple-terminal
Shell zsh

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. The payload examples and steps were super helpful.

Confirmed, both points are correct. subagentStart and subagentStop currently fire in the parent conversation context, so parent_conversation_id, generation_id, and session_id duplicate conversation_id, and subagent_id is just the parent Task tool_call_id. And the subagent’s own hooks preToolUse and postToolUse really don’t include any field that links back to the parent. So right now you can’t rebuild the session tree from hook payloads. This is a real gap, not intended behavior.

I filed this internally as a bug. I can’t share an ETA yet, but I’ll post an update in the thread as soon as I have one.

Your link to Claude Code parity keeping the parent session_id on subagent hooks and adding agent_id and agent_type is a solid reference, and I attached it to the report.