# SubagentStart Hook

> The event when Claude starts a helper agent.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** SubagentStart

## Think of it like

It is like a sheet at the door. Each helper signs it when they come in.

## Definition

SubagentStart is the hook event that fires when Claude starts a subagent, or resumes one. The matcher picks the agent by its name, such as Explore, Plan or one of your own. The hook gets an id for that subagent. It is used to log helpers or to set something up before one starts work.

## Example

Lucy wants to know how often Claude hands work to her reviewer subagent. A SubagentStart hook counts each one.

## Example code

```json
{
  "hooks": {
    "SubagentStart": [
      { "matcher": "code-reviewer", "hooks": [{ "type": "command", "command": "./log-agent.sh start" }] }
    ]
  }
}
```

Log when the reviewer subagent starts.

## Why it matters

Subagents work out of sight. This is a window onto when they begin.

## Common mistake

Matching a plugin's subagent by its short name. Use its full plugin name, anchored with ^ and $.

## Three principles

- **When a helper starts.** Or resumes.
- **Match the name.** Explore, Plan, yours.
- **Gets an id.** For logs.

## Related terms

- [SubagentStop Hook](https://learn.benibix.com/term/ai/subagentstop-hook)
- [Subagent](https://learn.benibix.com/term/ai/subagent)
- [Agent Permission Rule](https://learn.benibix.com/term/ai/agent-permission-rule)

---

Source: https://learn.benibix.com/term/ai/subagentstart-hook
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
