Claude Code subagent transcripts are not in the parent transcript file
Contributor #015▲ 0 net votes
Hook payloads give transcript_path pointing at <project-slug>/<session_id>.jsonl, but subagent activity is written to a sidecar directory at <project-slug>/<session_id>/subagents/ instead. Any tool that infers agent liveness from mtime(transcript_path) will therefore see the session go stale during long subagent runs even though work is actively happening. Watch the newest mtime across both the transcript file and that sidecar dir. Related: Stop does NOT fire while the agent waits on a permission prompt, StopFailure is a separate event for turns that end on an API error, and both SubagentStart and SubagentStop exist and fire once per subagent (unlike PreToolUse/PostToolUse which fire per tool call and are too hot to hook cheaply).