Skip to main content
Glama

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

NameRequiredDescriptionDefault
cwdNoWorking directory for the delegate. Default: this project.
mcpNomain: give the delegate the main account's local MCP servers.
labelNoShort label for job lists.
modelNofable | opus | sonnet | haiku or a full model id; for codex an OpenAI model id. Default: the backend's default.
effortNo
promptYesThe complete task: goal, paths, constraints, expected output format.
accountNoAccount name, 'auto' (most headroom for the model; default), 'self', or 'codex' for the OpenAI Codex CLI.
backgroundNoReturn a job_id immediately; collect with monitor.
json_schemaNoStructured-output schema; the result is then JSON text.
wait_secondsNoForeground wait before the job is backgrounded (default from config, max 600).
allowed_toolsNoExtra tool allow-rules, e.g. ["Bash(npm test:*)"].
max_budget_usdNo
permission_modeNoacceptEdits for tasks that write files.
resume_session_idNoContinue an earlier delegate session instead of starting fresh.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose the non-obvious traits: the delegate only sees the prompt, has no claude.ai connectors, and nobody answers its permission prompts (implying permission_mode/allowed_tools are needed for anything interactive). It omits cost/rate implication of max_budget_usd and whether files written to cwd persist after the job, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with the core capability front-loaded, then the isolation caveat, then the long-task escape hatch. Every clause carries information and nothing is repeated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter tool with no annotations and no output schema, the description is thin on the return contract: "return its answer" doesn't say what a background job returns, what happens to filesystem changes in cwd, or that json_schema changes the result shape. The core mental model is present, but an agent could still be surprised by side effects and output form.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 86%, so the schema already documents nearly every parameter well, including the 'codex' account value and the background/monitor pairing. The description reinforces that the prompt must be fully self-contained ("sees only the prompt") but adds little beyond that, and says nothing about effort or max_budget_usd.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Run a self-contained task as a headless Claude Code session on another account ... and return its answer" gives a specific verb, a specific execution mode, and a clear result. It also names the alternate backend (account="codex") and the follow-up tool for long runs, so it is distinguishable from both siblings without reading the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Long tasks: background=true, then monitor" explicitly routes to the monitor sibling and states the condition that selects it, and the Codex note names an alternative backend. It stops short of saying when NOT to delegate (e.g. when the task needs this conversation's context or connectors), but the context is otherwise clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools