spawn_session
Start a new headless persisted coding agent session to run an independent task. Use an isolated working directory when concurrent edits could collide.
Instructions
Start a new headless persisted Claude, Codex, Copilot, Cursor, Gemini, AGY, Grok, or OpenCode session for independent work. Provide a complete task and request a reply. Pass an explicit isolated cwd when concurrent edits could collide. The host's native approvals apply; magents does not bypass them. An accepted/starting response means launch was accepted, not completed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent": "<agent>",
"message": "<message>"
},
"name": "spawn_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Isolated working directory for the new session | |
| agent | Yes | agy, claude, codex, copilot, cursor, gemini, grok, or opencode | |
| message | Yes | Complete independent task, including verification and how to reply |