agent_spawn
Start a new Claude Code or Antigravity agent session as a controlled subagent, choosing background or tmux mode and passing a prompt, model, and working directory.
Instructions
Start a new agent session. harness=claude uses Claude Code's native background session (preferred — it has a real id and a real log). harness=agy starts a tmux-hosted Antigravity session, because agy has no background mode. mode=tmux forces an interactive tmux session for either harness.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory | |
| mode | No | auto = background for claude, tmux for agy | |
| name | No | Session name (tmux mode, and used to label the session) | |
| agent | No | Claude only: named agent | |
| model | No | Model id | |
| effort | No | ||
| prompt | No | Initial instruction | |
| add_dir | No | Extra directories to allow | |
| harness | Yes | Which agent to start | |
| mcp_config | No | Claude only: --mcp-config paths | |
| permission_mode | No | Claude only, e.g. bypassPermissions, acceptEdits, plan |