[FEATURE] Let a parent session observe its spawned children — return a session id from spawn_task and/or expose spawnedBy lineage in list_sessions
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_taskreturns atask_id, not a session id.list_sessionshas nospawnedBy/ lineage field, and there is notask_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:
- Have
spawn_taskreturn the spawned session's id (once the chip is started), so the parent holds a stable handle to its child. - Add a
spawnedBy(parent session id) field tolist_sessionsentries, so a parent can filterlist_sessionsto 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.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗