Delegate task
delegate_taskEnqueue a self-contained coding task for a DevIntern worker to implement in its own checkout and open a PR. Use for agreed, reviewable handoffs; include scope, acceptance criteria, and verification.
Instructions
Enqueue an ad-hoc task for a workspace repo, exactly like devintern worker add --json: a DevIntern worker implements it in its own checkout and usually opens a PR. Use it only for work the user agreed to hand off, preferably independent pieces that can be reviewed separately. The brief must be self-contained: the worker does not see this chat, uncommitted edits, or local-only files, so include the goal, relevant files, acceptance criteria, scope limits, and verification commands, and push commits it depends on. The body is limited to 20000 characters. Pass a stable idempotencyKey so a retry returns the same task (deduplicated: true) instead of a second one. For dependent work, enqueue each step now with after: [earlier taskKey] (any repo in the workspace; a step in another repo waits for that PR to merge) instead of waiting. Each task opens its own PR from its own branch; it cannot push to an existing PR. To branch from an existing remote branch and open the PR into it, put a Target branch: <branch> line in the body (it overrides stacking). Success means queued, not implemented: follow up with wait_for_tasks or get_task. When this is refused because direct delegation is off, use propose_task.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo": "<repo>",
"title": "<title>",
"body": "<body>"
},
"name": "delegate_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Self-contained Markdown brief (at most 20000 characters) | |
| repo | Yes | [[repos]] name (see get_workspace_config) | |
| after | No | Task keys (any repo in the workspace) this task starts after; one in another repo always waits for its PR to merge | |
| model | No | ||
| title | Yes | Short task title; also names the branch | |
| effort | No | Reasoning effort: low, medium, or high | |
| harness | No | Pin the run to this agent harness | |
| dependencyMode | No | stacked: once a same-repo dependency succeeded, branch from its branch and open this PR against it; the worker retargets and rebases the PR after the dependency merges. merged: wait for the dependency's PR to merge. Default: the workspace's [defaults].dependency_mode | |
| idempotencyKey | No | Stable key for retries of the same dispatch |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| repo | No | ||
| status | No | ||
| message | No | ||
| taskKey | No | ||
| warnings | No | ||
| dependsOn | No | ||
| errorCode | No | Set on failure: stable error code | |
| nextSteps | No | Set on failure: steps to run next (`command` runs on the worker host) | |
| deduplicated | No | ||
| dependencyMode | No | ||
| dependencyState | No | ||
| dependencyReason | No | ||
| harnessPausedUntil | No |