Claude subagent for Claude Code

Understand when Claude Code uses the built-in Claude agent for work that needs the general toolset or a dispatched background session.

How to use the Claude subagent in Claude Code

  1. Use an interactive session that exposes the relevant background or delegation feature.
  2. Use the example below as a starting point and replace the sample task with your own.
Claude Code prompt · Try this example
Delegate a read-only inventory of documentation entry points in this repository. Return the three starting files and explain why each matters.

Use the catch-all for a bounded task

Provide the root folder, the output format, and the restrictions you expect the task to follow. Read the resulting summary and verify that each cited file is an actual entry point.

Check the background session’s permissions

The default permissions depend on how the session was started. Inspect the selected mode and workspace before giving a background session tasks that can modify files.

Browse Agents