spawn
Delegate a coding task to a background Cursor agent and get an agent ID immediately without blocking. Provide a self-contained prompt naming files, goal, and verification.
Instructions
Delegate a task to a Cursor agent (Grok by default) running detached in the background. Returns immediately with an agent id — it does NOT wait. The agent shares none of your context, so prompt must be a self-contained brief: name the files, the goal, and how to verify. Project AGENTS.md, .cursor/rules, .agents/skills and .cursor/mcp.json are honored automatically. After spawning, run the returned attachCommand via Bash with run_in_background:true, passing the returned attachDescription VERBATIM as the Bash tool's description. The task panel labels the row from that description, so a generic one hides what the agent is doing from the user. The task's exit notifies you when the agent finishes — do not poll.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Defaults to the project root. | |
| model | No | Base model id: grok-4.6 (default) or grok-4.5. | |
| title | Yes | Short imperative description shown to the user in the task panel and status line, e.g. "port auth tests to vitest". Not a generic label. | |
| effort | No | Reasoning effort, default high. Use low for genuinely trivial work; high costs ~16s of latency floor. | |
| prompt | Yes | Self-contained brief for the agent. | |
| sandbox | No | Enable Cursor's sandbox. Blocks ALL MCP tool calls and shell network access. Off by default. | |
| readOnly | No | Plan mode with edit/write/delete disallowed. Use for research and review. | |
| allowFast | No | Permit the fast model tier, which costs roughly double. Only with explicit user consent. |