delegate
Run a self-contained task as a headless Claude Code session on another account or the Codex CLI and return its answer. Use for heavy work that should not consume the current account's limits.
Instructions
Run a self-contained task as a headless Claude Code session on another account (or on the OpenAI Codex CLI with account="codex") and return its answer. The delegate sees only the prompt, has no claude.ai connectors and nobody answers its permission prompts. Long tasks: background=true, then monitor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the delegate. Default: this project. | |
| mcp | No | main: give the delegate the main account's local MCP servers. | |
| label | No | Short label for job lists. | |
| model | No | fable | opus | sonnet | haiku or a full model id; for codex an OpenAI model id. Default: the backend's default. | |
| effort | No | ||
| prompt | Yes | The complete task: goal, paths, constraints, expected output format. | |
| account | No | Account name, 'auto' (most headroom for the model; default), 'self', or 'codex' for the OpenAI Codex CLI. | |
| background | No | Return a job_id immediately; collect with monitor. | |
| json_schema | No | Structured-output schema; the result is then JSON text. | |
| wait_seconds | No | Foreground wait before the job is backgrounded (default from config, max 600). | |
| allowed_tools | No | Extra tool allow-rules, e.g. ["Bash(npm test:*)"]. | |
| max_budget_usd | No | ||
| permission_mode | No | acceptEdits for tasks that write files. | |
| resume_session_id | No | Continue an earlier delegate session instead of starting fresh. |