Grok Delegate
v4.0.0Bring the Grok Build CLI into your agent's council for second opinions, plans and edits.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
delegate Delegate coding task to Grok
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 handin…
| Parameter | Type | Description |
|---|---|---|
spec * | string | 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. |
workspace * | string | 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. |
context | string | 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. |
contextFiles | array | 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… |
effort | string | 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… |
fast | boolean | 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 | string | 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… |
model | string | Bare ACP family id, version included, such as grok-4.7. The ids on offer depend on the account; doctor deep:true lists them. |
resumeSessionId | string | Continue an existing ACP session. When delegate ran as an MCP task, its server-side task id works too. |
cancel Cancel Grok delegation
Best-effort cancel of an in-flight delegation by sessionId. session/cancel is advisory — the agent may finish the turn anyway, and the delegate result then carries cancelRequested. Status: cancelled, killed (agent process observed to exit), not-running (turn already ended, still resumable), not-found (id not in this process's session history).
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | When delegate runs as an MCP task, its server-side task id works too. |
force | boolean | Kill the agent process if the turn is still running after a short grace period. |
doctor Diagnose Grok delegation setup
Diagnose the grok CLI, login, plan and workspace (default: server cwd); warnings lists what needs action. Run when delegation fails.
| Parameter | Type | Description |
|---|---|---|
deep | boolean | Also open an ACP session: adds the models this account offers, the default model check, modes and the current model's options. |
workspace | string |