SubagentStop Hook

Agent SDK

Definition

An Agent SDK lifecycle hook that fires when a subagent finishes its task. Allows the orchestrator to inspect and post-process subagent results before they are returned to the parent session. Used for result validation and format normalization.

Example Usage

Use SubagentStop to validate that the research subagent's output matches the expected schema before merging it with results from other subagents.