delegate_task
Assign tasks to headless CLI agents with capability matching, isolated worktrees, and post-run checks for verified delegation.
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. memory_mode controls dispatch memory: auto (the default) infers an opaque Git checkout identity when no project is supplied, explicit requires memory_project, and off disables memory. An explicit project overrides inference. Raw prompts are never stored in memory. on_limit='handoff' is opt-in and requires worktree=True; only a configured, provider-specific quota signature can rotate to another available agent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| role | No | ||
| agent | No | ||
| model | No | ||
| write | No | ||
| checks | No | ||
| effort | No | ||
| prompt | No | ||
| on_limit | No | stop | |
| worktree | No | ||
| agent_name | No | default_agent | |
| background | No | ||
| memory_mode | No | auto | |
| exclude_agents | No | ||
| memory_project | No | ||
| required_capabilities | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |