Run a subagent task on an available CLI backend
swarm_runDelegate a self-contained task to a locally logged-in CLI backend, choosing the profile, model, and inline wait to get fast background results.
Instructions
Delegate a task to the selected CLI backend ('auto', 'codebuddy', 'qoder', or 'zcode'). On CLI backends (codebuddy, qoder), profile defaults to 'lite' (zero tools, minimal token/credit cost; great for fast pure-reasoning/extraction), readonly enables Read/ViewImage/Glob/Grep/WebSearch/WebFetch, and workspace grants full workspace access in cwd. Set waitSec (e.g. 30-55) for single-call inline completion on fast CLI tasks, or omit / 0 to return taskId immediately.
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": {
"prompt": "<prompt>"
},
"name": "swarm_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for CLI backends (must exist). | |
| model | No | Model ID (e.g. hy4flash-free, deepseek-v4.1-flash, DeepSeek-Flash, Qwen3.8-Flash, GLM-5.3). | |
| prompt | Yes | Complete, self-contained task prompt. | |
| backend | No | Target backend: auto (default), codebuddy, qoder, or zcode. | |
| profile | No | Tool/permission profile: lite (default on CLI backends), readonly, or workspace. | |
| waitSec | No | Wait up to N seconds inline (0 = async return immediately, max 55). | |
| provider | No | ZCode-only billing route override. | |
| ephemeral | No | Disable session persistence on CLI backends (--no-session-persistence). | |
| fallbackModel | No | Optional fallback model when backend supports it (e.g. codebuddy). |