Delegate coding task to Grok
delegateHand off coding work or ask Grok Build questions over ACP without shelling out, returning structured results and supporting session resume.
Instructions
Ask Grok Build a question or delegate coding work to it over ACP. Never shell out to grok — use this tool only. mode ask gives a second opinion; parallel calls with the same brief compare views. Auto-approves every permission the agent requests, in any mode and anywhere on disk. The agent's clarifying questions arrive in questions, or as prose in result — resume with resumeSessionId, the same mode and the answers in spec. Leave model (grok-4.7 where the account has it), fast, effort and context unset unless the user explicitly asks. If the delegate skill is installed, load it before handing off implementation.
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": {
"spec": "<spec>",
"workspace": "<workspace>"
},
"name": "delegate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fast | No | Fast tier; higher cost — only when the user asks. Where the model or the account has none, the run goes on and protocolWarnings says so. | |
| mode | No | agent implements. ask answers: the CLI refuses its shell commands and file writes. plan returns a plan: the CLI refuses its write tool outside plan files, while shell commands still run and can change files. ask and plan run without subagents. | agent |
| spec | Yes | Task brief: goal, scope, fixed decisions quoted exactly, acceptance criteria. Sent as written. Point at files to read rather than pasting code, or attach them with contextFiles. | |
| model | No | Bare ACP family id, version included, such as grok-4.7. The ids on offer depend on the account; doctor deep:true lists them. | |
| effort | No | Exact reasoning-effort value for the selected model. Levels depend on the model and the account; one that is not on offer fails before the prompt. Pass only when the user asks for Grok effort — the host's own reasoning setting is unrelated. | |
| context | No | Context window size as the model's label or a token count, such as 500k or 256000. Do not pass speculatively. Handled like fast when not on offer. | |
| workspace | Yes | The agent's working directory, not a limit. Smallest directory holding the task's files; with no such directory the project root is the floor. Must already exist; never create one for the call. | |
| contextFiles | No | Paths to attach instead of pasting contents into spec. Text becomes references the agent may open; images (png/jpg/gif/webp, <5MB) are sent inline. Relative paths resolve against workspace but are not limited to it. Skips are reported in protocolWarnings, never fatal. | |
| resumeSessionId | No | Continue an existing ACP session. When delegate ran as an MCP task, its server-side task id works too. |