delegate
Hand off coding tasks to Cursor's agent for automated implementation. Supports plan mode and session resume for iterative work.
Instructions
Delegate a coding task to cursor-agent over ACP. Never shell out to cursor-agent — use this tool only. Pass structured task text inline in spec (default); a file path is optional when the user wants a persisted brief. Defaults: mode=agent, model=composer-2.5, fast=false. Plan workflow: mode=plan, then resume with mode=agent and resumeSessionId. Auto-approves every permission the agent requests, in any mode and anywhere on disk. Clarifying questions arrive as prose in result — resume with resumeSessionId to answer. Returns the final result, selection source, stop reason, session ID, agent-reported files, and optional plan. See the delegate skill for orchestration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fast | No | Fast speed tier — higher cost; enable only when the user asks | |
| mode | No | Requested agent mode. plan and ask are passed to the agent as instructions, not enforced by the bridge — the agent may write in any of them, so review the git diff after every run. ask held on every model tested while plan compliance varies by model, so prefer ask when you need the stricter read-only instruction. | agent |
| spec | Yes | Inline task brief (default): goal, scope, decisions already made (constraints and fixed choices — quote the user's exact values verbatim), acceptance criteria. Point at files to read or mimic rather than pasting code. Optional file path if the user wants a persisted spec. | |
| model | No | composer-2.5 | |
| context | No | Context window size. Not offered by every model; gpt-5.x accepts 272k and 1m. | |
| reasoning | No | Reasoning effort. Not offered by every model; gpt-5.x accepts none, low, medium, high, extra-high. | |
| workspace | No | Working directory for the agent (defaults to cwd). Must be an existing directory; the call fails rather than creating it. | |
| contextFiles | No | Paths to attach instead of pasting file contents into spec. Text files are passed as references the agent may open; images (png, jpg, gif, webp, under 5MB) are sent inline. Relative paths resolve against workspace, and paths outside it are allowed — attach only files the agent should read. Anything skipped is reported in protocolWarnings, never fatal. | |
| resumeSessionId | No | Resume an existing ACP session instead of a new one |