Separate delegated reasoning from lifecycle-triggered automation and shared side effects.
Coding & development · Documented · Documentation checked 2026-10-04
Claude Code in terminals and supported development surfaces; Claude chat is not a local shell.
Authentication, installed version, surface, subscription or API billing, and organization policy matter.
The worked example is illustrative and has not been tested in a signed-in product account.
What it does and how it connects
Separate delegated reasoning from lifecycle-triggered automation and shared side effects.
A subagent delegates work in a separate reasoning context; a hook runs configured logic at a lifecycle event. Both can participate in a larger task, but a hook can execute deterministically while a subagent chooses intermediate reasoning steps. Their file and external side effects still need coordination.
Walkthrough
Use the product named in the access panel. The steps below combine documented controls with the editorial example.
- Define a narrow delegated role and the information it may use.
- Inspect existing hooks before adding any script or endpoint.
- Test the procedure on a disposable sample and keep outputs separate.
- Review each result and any executed hook action before adopting the configuration.
Worked example
Delegate a read-only review of a navigation change while the main agent inspects implementation. A hook could run an approved validation command, but it should not auto-deploy merely because an edit completed. Multiple reviewers are not independent evidence if they share the same mistaken premise.
Review the current navigation diff in read-only mode. Return only reproducible findings with file, trigger, and impact. Do not edit files or call external services. Mark uncertain concerns as hypotheses. The main reviewer will decide which findings warrant a change.
Inspect and verify the result
Inspect delegated findings against the code and actual hook execution logs. Check overlapping file writes and recursion risks. Verify that a configured validation step ran rather than inferring it from a hook’s presence.
Limits and troubleshooting
Extension support and hook mechanisms depend on surface and version. Parallel tasks can conflict over shared resources. A lifecycle event alone does not prove a change is ready to publish.
Data, permissions, and actions
Hooks can execute code or invoke endpoints with host authority. Subagents can use available tools under their configuration. Limit capabilities, avoid secret-bearing logs, and preserve human review for consequential operations.
Related reading
Permission modes and stopping rules
Use enforceable tool policies rather than relying on prose instructions as access controls.
A local change with explicit permission review
Implement a small sample fix and verify its behavior.
A read-only extension-assisted review
Use approved issue context and delegated review without external side effects.
Permissions and meaningful approvals
Decide what a system may read, what it may change, and when someone needs to authorize a concrete action.
Sources and verification
Documentation checked 2026-10-04. Examples are illustrative unless described otherwise.
Features and extension relationships · Anthropic