Run Claude Code
claude_runLaunch a Claude Code subagent in a workspace to run tasks in the background, returning a job ID for polling status. Use consult for read-only analysis or execute for file-editing tasks.
Instructions
Start a new Claude Code session in a workspace. Returns a jobId immediately; the run continues in the background. Use claude_status to poll for the result. Tier "consult" is read-only; "execute" may edit files in the workspace.
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": {
"tier": "<tier>",
"prompt": "<prompt>",
"workspace": "<workspace>"
},
"name": "claude_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tier | Yes | Permission tier for the run. | |
| model | No | Model alias or full name; defaults to the CLI's. | |
| effort | No | Reasoning effort. | |
| prompt | Yes | The task for the subagent. | |
| maxTurns | No | ||
| workspace | Yes | Absolute path to an allowed workspace directory. | |
| waitSeconds | No | Block up to this long for the first result instead of returning at once. | |
| maxBudgetUsd | No | Spend ceiling for the run. |