session_start
Start or queue a new headless Claude Code run, returning a run_id and background wait command; choose read-only or isolated edit mode with optional budget controls.
Instructions
Start a new headless Claude Code run (or queue it). Returns run_id and a wait_cmd to run in a background Shell. Default mode is read-only; edit mode uses a git worktree unless isolation='none'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bot | Yes | Your bot name (attribution). | |
| cwd | Yes | Working directory; must be under an allowed root. | |
| mode | No | read | |
| model | No | ||
| trust | No | trusted | |
| effort | No | ||
| notify | No | auto | |
| prompt | Yes | Task for Claude (≤100 KB). | |
| priority | No | ||
| chat_hint | No | Short label for this chat (≤80 chars). | |
| isolation | No | ||
| max_turns | No | ||
| name_slug | No | ||
| notify_ref | No | ||
| json_schema | No | ||
| timeout_min | No | ||
| allowed_tools | No | Edit mode: permission rules, e.g. 'Bash(git diff *)'; checked against policy. | |
| queue_if_busy | No | ||
| fallback_model | No | ||
| max_budget_usd | Yes | Required USD cap for this run (clamped to policy). | |
| idle_timeout_min | No | ||
| append_system_prompt | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||