Delegate Task
delegate_taskDelegate a task to a specialized local coding agent by spawning its CLI in a given workspace, waiting for it to finish, and returning the output and exit code.
Instructions
Spawns the named agent's CLI in workspace_path with the given prompt, waits for it to finish, and returns its stdout/stderr/exit code. Use get_agent_roster first to pick the right agent_name.
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": {
"agent_name": "<agent_name>",
"prompt": "<prompt>",
"workspace_path": "<workspace_path>"
},
"name": "delegate_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The task/instructions to hand to the agent's CLI. | |
| agent_name | Yes | Which agent to delegate to. One of: codex, agy, claude-code. See get_agent_roster for specializations. | |
| timeout_ms | No | Max time to wait for the agent process, in ms. Defaults to 15 minutes, capped at 1 hour. | |
| workspace_path | Yes | Absolute path to the working directory the agent CLI should run in. |