claude_start_task
Start long-running Claude Code tasks (up to 3600s) in the background and get a run ID immediately. Monitor progress with poll, stop with cancel.
Instructions
Start a Claude Code CLI task asynchronously (up to 3600s).
Returns immediately with a run_id. The subprocess continues running in
the background; use claude_poll_task to monitor and claude_cancel_task
to stop. Use this for any task that may exceed 600s (architecture,
migration, large multi-file refactors, long-running data agents).
Required: workspace_path, prompt. Optional: model, fallback_model, permission_mode, options.timeout_s (default 300, max 3600 for async), capture_changes.
Concurrent run limit: bounded by Settings.max_concurrent_runs. New calls beyond that limit return MAX_CONCURRENT_RUNS_EXCEEDED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| req | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | ||
| session_id | Yes | ||
| started_at | Yes |