A SubagentStop hook now fires when a subagent finishes, alongside the existing SubagentStart hook
Hooks are user-configured scripts that run automatically at specific points in Claude Code's operation. The internal hook-event handling now treats SubagentStop the same way it already treats SubagentStart, which means a Stop-style hook can now fire when a subagent (a separate Claude instance handling a sub-task) finishes, not just when one is spawned.
This gives users a way to run a hook specifically when a subagent completes its work, complementing the existing SubagentStart hook that fires when one is spawned.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Not every SubagentStop event comes from a subagent Claude spawned. Claude Code also runs internal agents for some of its own features, such as [prompt suggestions](/docs/en/interactive-mode#prompt-suggestions) and [`/btw` side questions](/…hooks see the edit
Anthropic's documentation has since written up SubagentStop, on Hooks reference.
Fixed SubagentStop hooks with a specific matcher firing for every stopping subagent whose agent type was empty