Delegate independent subtasks to `claude -p` instances. Use when you need to parallelize work across multiple files or modules that have no write conflicts.
--dangerously-skip-permissions only skips internal promptsclaude -p cannot reach the API, run it outside the restrictive sandbox or escalateWorking directory: <absolute-path>
Target files: <file1>, <file2>
Task: <clear description>
Input: <context or code snippets>
Requirements:
- Modify only the listed files
- Run verification: <command>
- Report: summary of changes + verification output
- End with: TASK_COMPLETE or TASK_FAILED: <reason>
| Strategy | When to use |
|---|---|
| File locks | Pre-declare locks before delegating |
| Phased execution | Stage 1: interfaces; Stage 2: parallel implementations |
| Isolation | Separate directories/workspaces for independent work |