Triggered before the Subagent starts execution. Unlike Stop and SubagentStop, the SubagentStart Hook cannot prevent the Subagent from executing, but can provide suggestions or warnings to the Subagent through the model or Shell script.
Input Parameters
The parameter format is consistent with SubagentStop.
Output Parameters
{ "hookSpecificOutput":{ "hookEventName":"SubagentStart", "additionalContext":"Please follow security guidelines: do not access production environment databases" } }
Configuration Methods
Prompt Method
Provide suggestions to the Subagent through the model:
Use matcher to match Subagent names
Use pipe | to match multiple names, e.g., Explore|Test
Use * to match all Subagents
{ "hooks":{ "SubagentStart":[ { "matcher":"Explore", "hooks":[ { "type":"prompt", "prompt":"Review this subagent task: $ARGUMENTS. If the task description is vague or potentially dangerous, warn the user." } ] } ] } }