[harness] Subagent lifecycle invisible to hooks: resumes log no start, reports delivered twice, tool-written files carry no caller identity

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 28, 2026

Context. Solo-operator project using Claude Code (desktop app, Windows 11) with a lead session on Claude Fable 5.1 orchestrating Opus 5.5 / Sonnet subagents (in-process, worktree-isolated), a JSON task store (~1,100 records), PreToolUse/SubagentStop hooks and a harvest-train commit flow. Everything below was measured on 2026-09-28 in one session of ~20 dispatches, two blind judge pairs and nine commits. Numbers are from tool output, not recollection; no secrets or private paths included.

Finding. (1) Resuming a finished subagent via SendMessage emits no new start event to hooks and re-notifies under the SAME task id, so a PreToolUse concurrency hook counted six while seven ran. (2) Every subagent's final report arrived twice: an agent-message with the full text, then a task-notification saying to read it there. (3) Hooks receive no agent/session identity, so a project journal of 1,141 writes in one day could not distinguish the lead's writes from a subagent's.

Reproduction. Resume a finished subagent by message and inspect hook payloads; write a file from a subagent and from the lead and try to tell them apart from hook input.

Ask. Expose resumes as starts (or a resume event) to hooks; deliver the final report once, in the notification; pass agent id + session id to hooks and to tool-written artifacts.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗