delegate_task
Offload work to a headless CLI agent by specifying required capabilities, role, or agent. Run isolated worktrees and define shell checks to verify results before review.
Instructions
Delegate a task to a headless CLI agent or role.
The default agent='auto' selects an installed worker by capability. Pass required_capabilities when the orchestrator already knows what the task needs, and exclude_agents to keep the human-facing orchestrator out of the worker pool. Direct agent selection and static roles remain available as explicit overrides. If worktree is True, the agent runs in an isolated git worktree branching from cwd. checks are shell commands run after the agent finishes (for example a test command); read their outcome with job_review before spending anything on the job's output. Optional memory_project enables automatic local session-memory bootstrap and finalization for the given project key without storing raw prompts in memory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| role | No | ||
| agent | No | ||
| model | No | ||
| write | No | ||
| checks | No | ||
| effort | No | ||
| prompt | No | ||
| worktree | No | ||
| agent_name | No | default_agent | |
| background | No | ||
| exclude_agents | No | ||
| memory_project | No | ||
| required_capabilities | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |