runClaudeTask
Enqueue a Claude task with a given prompt, optionally add context files, and either return a taskId for async polling or stream the response in real time.
Instructions
Enqueue Claude subprocess task. Returns taskId for getClaudeTaskStatus, or stream=true to block.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Prompt to send to Claude | |
| contextFiles | No | Workspace-relative or absolute paths to add as context (max 20). | |
| timeoutMs | No | Task timeout in ms (5000–600000). Default: 120000. | |
| stream | No | Block + stream via progress. Default: false (return taskId). | |
| model | No | Model override, e.g. "claude-haiku-4-5-20251001". | |
| effort | No | Thinking budget: low/medium/high/max. | |
| fallbackModel | No | Fallback model if primary overloaded/unavailable. | |
| maxBudgetUsd | No | Spend cap in USD. Omit for no cap. | |
| startupTimeoutMs | No | Abort if no output within this ms of spawn. | |
| systemPrompt | No | System prompt override. Max 4096 chars. | |
| useAnt | No | Run this task with the ant binary instead of claude. Requires ant on PATH or --ant-binary configured. |