How to use the General-purpose subagent in Claude Code
- Start Claude Code inside the repo and state exactly which actions and files are in scope.
- Use the example below as a starting point and replace the sample task with your own.
Use the general-purpose subagent to fix the date formatter in src/date.ts and run the date unit tests. Leave unrelated files alone.Delegate a small fix with an acceptance check
Give the agent one file or issue and a test command. Ask it to summarize changed files, the failing input it fixed, and the evidence from the named test suite.
Review permission and scope
General-purpose agents can have broader tools than Explore or Plan. Keep credentials and unrelated environments outside the task. Review the diff and run the same checks from the main session when useful.