Skip to main content
Glama

codex_delegate

Delegate a coding task to Codex in an isolated git worktree and receive a reviewable diff without applying changes to your tree.

Instructions

Delegate a coding task to Codex (a different model) in an isolated git worktree, and get back a reviewable diff that is NOT applied to your tree.

Codex edits files with workspace-write, but only inside a throwaway worktree seeded from your current tracked state. The returned diff is Codex's changes; review it, then apply it yourself if you want it. Requires a git repo with at least one commit. Pass workspace_root (absolute).

NO NETWORK: workspace-write blocks network egress for commands Codex RUNS in the sandbox, so the task must be self-contained — it cannot git push/fetch, gh anything, curl, publish, or install dependencies (those fail inside the sandbox with a DNS/host-resolution error). Ask only for local code changes; do any network step yourself afterward. This does NOT mean nothing leaves the machine: the Codex model call still sends your task to OpenAI and lets Codex read tracked files in the worktree and send their content. Your task is sent raw — secret redaction is best-effort and does not cover it or files Codex reads itself.

Progress: this is a blocking call that returns only when Codex finishes; it does not stream incremental notifications/progress, and a delegate can run ~20s+. If you need live status or recoverability, use codex_delegate_async for a job_id and poll codex_job_status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesThe coding task for Codex to implement inside a throwaway git worktree; the resulting diff is returned for review, not applied to your tree.
modelNoOverride the Codex model slug for this call; defaults to the server/Codex default when unset.
detailNoResponse verbosity: 'summary' (default) omits the raw model text; 'full' includes it.summary
isolationNoCodex config isolation: 'inherit' (default), 'ignore-config', or 'ignore-rules'.
workspace_rootNoAbsolute path to the target repository root. Pass it (or rely on an MCP root) so the call targets the intended repo; otherwise it falls back to the server's own cwd and meta.workspace_warning is set.
timeout_secondsNoPer-call wall-clock timeout in seconds, clamped to 10..600 (out-of-range values are coerced, not rejected). Defaults to the server's configured timeout.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
Behavior5/5

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

Discloses blocking behavior, no streaming progress, network egress blocking for commands but not for model call, and best-effort secret redaction. Annotations (openWorldHint=true) are consistent with external model call and file reading.

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

Conciseness4/5

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

Well-structured with front-loaded purpose and clear sections. Slightly verbose but each sentence adds value; efficient for the complexity.

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

Completeness5/5

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

Covers purpose, usage, behavioral nuances, limitations, and parameter details. Output schema exists, so return values are handled. Comprehensive for a complex tool.

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

Parameters4/5

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

Schema covers all parameters (100%). Description adds useful context: workspace_root absolute path requirement, timeout clamping, and model default behavior. While baseline is 3, extra context justifies a 4.

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?

Description clearly states the tool delegates a coding task to Codex in an isolated worktree, producing a reviewable diff that is not applied. This distinguishes it from siblings like codex_delegate_async (non-blocking) and codex_consult (no diff).

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

Usage Guidelines5/5

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

Explicit guidance: use codex_delegate_async if live status or recoverability is needed. Also warns about network restrictions and self-contained tasks, with specific instructions to handle network steps separately.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/briandconnelly/codex-in-claude'

If you have feedback or need assistance with the MCP directory API, please join our Discord server