[FEATURE] Let a parent session observe its spawned children — return a session id from spawn_task and/or expose spawnedBy lineage in list_sessions

Open 💬 5 comments Opened Jun 27, 2026 by odakin

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Priority: Medium
Feature Category: Sessions / subagent orchestration

Problem Statement

After mcp__ccd_session__spawn_task creates a child task/session, the parent session has no reliable way to observe whether the child actually launched or is running:

  • spawn_task returns a task_id, not a session id.
  • list_sessions has no spawnedBy / lineage field, and there is no task_id → session mapping.

So the only way for a parent to locate its child is fragile string-matching of the child's title against list_sessions, and there is no path for the harness to notify the parent that the child launched. When the chip title is generic, the parent can match the wrong session; when it can't match at all, the parent has no signal.

In practice this fragility leads a parent to assert child status without a reliable check (e.g. "the child hasn't started yet" / "it's still running") when it has no actual way to know — a confabulation hazard that better primitives would remove.

Proposed Solution

Either (or both) of:

  1. Have spawn_task return the spawned session's id (once the chip is started), so the parent holds a stable handle to its child.
  2. Add a spawnedBy (parent session id) field to list_sessions entries, so a parent can filter list_sessions to exactly its own children without title-matching.

Either eliminates the title-matching fragility and makes child launch/run state reliably discoverable; (1) additionally gives the parent a direct handle for any follow-up.

Additional Context

The Agent tool returns a subagent's result directly to the caller, whereas spawn_task (independent sessions) intentionally decouples — the right design for independence, but it currently leaves the parent with no lineage handle whatsoever. A returned session id or a spawnedBy field closes the observability gap without re-coupling the sessions.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗