Skip to main content
Glama

Delegate a coding task (paid)

codex_delegate
Destructive

Delegate coding tasks to Codex in an isolated worktree and receive a reviewable, unapplied diff so you can verify changes before merging.

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.

PAID — this spends Codex quota on every new call; use codex_delegate_dry_run or codex_status (both free) first if you only need to check scope or readiness.

Codex edits files with workspace-write in 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. The worktree does not bound Codex's writes: codex's workspace-write sandbox also lets commands write the OS temp roots (/tmp and $TMPDIR) by default. Temp-root writes are neither captured in the returned diff nor cleaned up. Codex can read files outside the workspace — up to everything the OS user running it can read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of workspace is a read boundary. Codex auto-loads the resolved workspace's AGENTS.md and, in a repository, ancestor AGENTS.md files through its root, plus a user-global $CODEX_HOME/AGENTS.override.md, else $CODEX_HOME/AGENTS.md; it discovers skills in the workspace's .agents/skills/ and user-global $CODEX_HOME/skills/ (default ~/.codex/skills/), reachable from outside the workspace. The plugin's isolation flags don't suppress any of it. For delegate, that workspace is the worktree; scrubbing it doesn't exclude $CODEX_HOME/skills/. A skill's name and description arrive up front; selecting one makes the model read its body, which can reach OpenAI even if your inputs never mention it. Your task is sent raw — secret redaction is best-effort and does not cover it or files Codex reads itself.

Progress & recovery: blocks up to the resolved deadline (timeout_seconds, clamped 10-600s; when omitted, the server-configured value, built-in default 300s). If that deadline expires the run is terminated and its partial output is not recoverable or resumable, so for a substantial or multi-file task that may exceed it, prefer codex_delegate_async (a background job, built-in default 1800s deadline; poll codex_job_status). Coarse notifications/progress streams while it blocks when your client requests it; some MCP clients background a long call before the deadline, so timeout_seconds bounds the run, not necessarily the inline wait — either way the detached run (meta.job_id) is recoverable via codex_job_listcodex_job_statuscodex_job_result.

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. Must be non-blank: empty or whitespace-only is rejected before any model call.
modelNoOverride the Codex model slug for this call; defaults to the server/Codex default when unset. Control characters are rejected, not stripped.
detailNoResponse verbosity: 'summary' (default) omits the raw model text; 'full' includes it.summary
isolationNoCodex config isolation: 'inherit' | 'ignore-config' | 'ignore-rules'. Defaults to the server's configured value (built-in 'inherit'; `codex_status` reports the resolved one).
workspace_rootNoAbsolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning. On an active call it selects where Codex works, not what it can read — it is not a read boundary.
idempotency_keyNoOptional dedup key scoped to THIS tool + workspace. Same key + same args replays the prior result with no new spend; different args are refused (idempotency_conflict). Sync and _async are separate tools and never share a key. Omit for none; retention is bounded. Lifecycle: codex://params.
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.
reasoning_effortNoOverride the Codex reasoning effort for this call (a model_reasoning_effort override); omit or pass null for the server default (CODEX_IN_CLAUDE_REASONING_EFFORT) or Codex's own resolution. An open, per-model string the backend validates at run time — commonly minimal|low|medium|high|xhigh; codex_models lists each model's advertised set (advisory). Rejection and bounds detail: codex://params.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changedv0.19.0
    • changedInput schema / properties / model / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^[^\\x00-\\x1F\\x7F-\\x9F]*$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / model / description
      Previous value: -"Override the Codex model slug for this call; defaults to the server/Codex default when unset."New value: +"Override the Codex model slug for this call; defaults to the server/Codex default when unset. Control characters are rejected, not stripped."
    • changedInput schema / properties / workspace_root / description
      Previous value: -"Absolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning."New value: +"Absolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning. On an active call it selects where Codex works, not what it can read — it is not a read boundary."
  2. Changed5 schema fields changedv0.17.0
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Optional client-supplied dedup key, scoped to THIS concrete tool on the same workspace. Reusing it on the same tool with the same arguments replays the existing run instead of starting — and paying for — a duplicate Codex call (a sync call reattaches to the in-flight run and returns its result; an _async call returns the same job_id). The sync and _async variants are DIFFERENT tools and never share a key's run. Reuse with different arguments — including a different timeout_seconds — is refused (idempotency_conflict); a key whose prior result was already consumed/evicted is idempotency_result_unavailable; a still-publishing reservation is idempotency_in_progress (retry). Omit it for the prior no-dedup behavior. A completed result stays replayable while its job record lives (its TTL), subject to consumption or count-eviction; the fail-closed conflict/in-progress window can last longer — up to the job's max runtime + termination grace + TTL. meta.idempotency_replayed=true marks a replayed (unpaid) response."New value: +"Optional dedup key scoped to THIS tool + workspace. Same key + same args replays the prior result with no new spend; different args are refused (idempotency_conflict). Sync and _async are separate tools and never share a key. Omit for none; retention is bounded. Lifecycle: codex://params."
    • changedInput schema / properties / isolation / description
      Previous value: -"Codex config isolation: 'inherit', 'ignore-config', or 'ignore-rules'. Defaults to the server's configured isolation (built-in default 'inherit'; `codex_status` reports the resolved value)."New value: +"Codex config isolation: 'inherit' | 'ignore-config' | 'ignore-rules'. Defaults to the server's configured value (built-in 'inherit'; `codex_status` reports the resolved one)."
    • changedInput schema / properties / reasoning_effort / description
      Previous value: -"Override the Codex reasoning effort for this call (sent as a `model_reasoning_effort` config override); omit (or pass null) for the server default (CODEX_IN_CLAUDE_REASONING_EFFORT) or Codex's own resolution. An open per-model string the Codex backend validates at run time — commonly minimal|low|medium|high|xhigh; codex_models lists each model's advertised set (advisory). A backend-rejected value fails as invalid_reasoning_effort; an explicit empty string is sent as-is (and rejected by the backend), never treated as unset. Control characters, surrogates, and values over 128 chars are rejected as invalid_arguments."New value: +"Override the Codex reasoning effort for this call (a model_reasoning_effort override); omit or pass null for the server default (CODEX_IN_CLAUDE_REASONING_EFFORT) or Codex's own resolution. An open, per-model string the backend validates at run time — commonly minimal|low|medium|high|xhigh; codex_models lists each model's advertised set (advisory). Rejection and bounds detail: codex://params."
    • changedInput schema / properties / task / description
      Previous value: -"The coding task for Codex to implement inside a throwaway git worktree; the resulting diff is returned for review, not applied to your tree."New value: +"The coding task for Codex to implement inside a throwaway git worktree; the resulting diff is returned for review, not applied to your tree. Must be non-blank: empty or whitespace-only is rejected before any model call."
    • changedInput schema / properties / workspace_root / description
      Previous value: -"Absolute 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."New value: +"Absolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning."
  3. Changed1 schema field changedv0.13.0
    • addedInput schema / properties / reasoning_effort
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 128,
      +      "pattern": "^[^\\x00-\\x1F\\x7F-\\x9F]*$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Override the Codex reasoning effort for this call (sent as a `model_reasoning_effort` config override); omit (or pass null) for the server default (CODEX_IN_CLAUDE_REASONING_EFFORT) or Codex's own resolution. An open per-model string the Codex backend validates at run time — commonly minimal|low|medium|high|xhigh; codex_models lists each model's advertised set (advisory). A backend-rejected value fails as invalid_reasoning_effort; an explicit empty string is sent as-is (and rejected by the backend), never treated as unset. Control characters, surrogates, and values over 128 chars are rejected as invalid_arguments."
      +}
  4. Changed4 schema fields changedv0.8.0
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 200,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional client-supplied dedup key, scoped to THIS concrete tool on the same workspace. Reusing it on the same tool with the same arguments replays the existing run instead of starting — and paying for — a duplicate Codex call (a sync call reattaches to the in-flight run and returns its result; an _async call returns the same job_id). The sync and _async variants are DIFFERENT tools and never share a key's run. Reuse with different arguments — including a different timeout_seconds — is refused (idempotency_conflict); a key whose prior result was already consumed/evicted is idempotency_result_unavailable; a still-publishing reservation is idempotency_in_progress (retry). Omit it for the prior no-dedup behavior. A completed result stays replayable while its job record lives (its TTL), subject to consumption or count-eviction; the fail-closed conflict/in-progress window can last longer — up to the job's max runtime + termination grace + TTL. meta.idempotency_replayed=true marks a replayed (unpaid) response."
      +}
    • changedInput schema / properties / isolation / description
      Previous value: -"Codex config isolation: 'inherit' (default), 'ignore-config', or 'ignore-rules'."New value: +"Codex config isolation: 'inherit', 'ignore-config', or 'ignore-rules'. Defaults to the server's configured isolation (built-in default 'inherit'; `codex_status` reports the resolved value)."
    • addedOutput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "assumptions": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "diff": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "findings": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "evidence": {
      -              "type": "string"
      -            },
      -            "file": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "line": {
      -              "anyOf": [
      -                {
      -                  "type": "integer"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "line_end": {
      -              "anyOf": [
      -                {
      -                  "type": "integer"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "recommendation": {
      -              "type": "string"
      -            },
      -            "risk": {
      -              "type": "string"
      -            },
      -            "severity": {
      -              "enum": [
      -                "critical",
      -                "high",
      -                "medium",
      -                "low",
      -                "nit"
      -              ],
      -              "type": "string"
      -            },
      -            "title": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "severity",
      -            "title",
      -            "evidence",
      -            "risk",
      -            "recommendation"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "meta": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "base": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "command_exit_code": {
      -            "anyOf": [
      -              {
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "commit": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "compat_warnings": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "context_summary": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "files_changed": {
      -                    "type": "integer"
      -                  },
      -                  "lines_added": {
      -                    "type": "integer"
      -                  },
      -                  "lines_removed": {
      -                    "type": "integer"
      -                  }
      -                },
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "cwd": {
      -            "type": "string"
      -          },
      -          "elapsed_ms": {
      -            "type": "integer"
      -          },
      -          "fingerprint": {
      -            "type": "string"
      -          },
      -          "isolation": {
      -            "enum": [
      -              "inherit",
      -              "ignore-config",
      -              "ignore-rules"
      -            ],
      -            "type": "string"
      -          },
      -          "job_id": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "model": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "paths": {
      -            "anyOf": [
      -              {
      -                "items": {
      -                  "type": "string"
      -                },
      -                "type": "array"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "rate_limit": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "age_seconds": {
      -                    "anyOf": [
      -                      {
      -                        "type": "integer"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "as_of": {
      -                    "anyOf": [
      -                      {
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "home_unverified": {
      -                    "type": "boolean"
      -                  },
      -                  "is_stale": {
      -                    "type": "boolean"
      -                  },
      -                  "limiting_window": {
      -                    "anyOf": [
      -                      {
      -                        "enum": [
      -                          "primary",
      -                          "secondary"
      -                        ],
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "note": {
      -                    "anyOf": [
      -                      {
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "plan_type": {
      -                    "anyOf": [
      -                      {
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "primary": {
      -                    "anyOf": [
      -                      {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "remaining_percent": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "reset_passed": {
      -                            "type": "boolean"
      -                          },
      -                          "resets_at": {
      -                            "anyOf": [
      -                              {
      -                                "type": "integer"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "seconds_until_reset": {
      -                            "anyOf": [
      -                              {
      -                                "type": "integer"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "used_percent": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "window_minutes": {
      -                            "anyOf": [
      -                              {
      -                                "type": "integer"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          }
      -                        },
      -                        "type": "object"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "secondary": {
      -                    "anyOf": [
      -                      {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "remaining_percent": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "reset_passed": {
      -                            "type": "boolean"
      -                          },
      -                          "resets_at": {
      -                            "anyOf": [
      -                              {
      -                                "type": "integer"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "seconds_until_reset": {
      -                            "anyOf": [
      -                              {
      -                                "type": "integer"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "used_percent": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "window_minutes": {
      -                            "anyOf": [
      -                              {
      -                                "type": "integer"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          }
      -                        },
      -                        "type": "object"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "source": {
      -                    "enum": [
      -                      "current_run",
      -                      "plugin_cache"
      -                    ],
      -                    "type": "string"
      -                  },
      -                  "status": {
      -                    "enum": [
      -                      "available",
      -                      "limited",
      -                      "exhausted",
      -                      "unknown"
      -                    ],
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "status"
      -                ],
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "redacted_paths": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "request_id": {
      -            "type": "string"
      -          },
      -          "sandbox": {
      -            "enum": [
      -              "read-only",
      -              "workspace-write",
      -              "danger-full-access"
      -            ],
      -            "type": "string"
      -          },
      -          "scope": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "security_warnings": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "session_id": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "tier": {
      -            "enum": [
      -              "consult",
      -              "propose",
      -              "apply"
      -            ],
      -            "type": "string"
      -          },
      -          "timeout_seconds": {
      -            "type": "integer"
      -          },
      -          "truncated": {
      -            "type": "boolean"
      -          },
      -          "truncation_hint": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "usage": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "cached_input_tokens": {
      -                    "anyOf": [
      -                      {
      -                        "type": "integer"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "input_tokens": {
      -                    "anyOf": [
      -                      {
      -                        "type": "integer"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "output_tokens": {
      -                    "anyOf": [
      -                      {
      -                        "type": "integer"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "total_tokens": {
      -                    "anyOf": [
      -                      {
      -                        "type": "integer"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  }
      -                },
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "workspace_source": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "workspace_warning": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          }
      -        },
      -        "required": [
      -          "cwd",
      -          "tier",
      -          "sandbox",
      -          "isolation",
      -          "timeout_seconds",
      -          "elapsed_ms"
      -        ],
      -        "type": "object"
      -      },
      -      "next_steps": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "ok": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "questions": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "raw_response": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "model": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "session_id": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "text": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "summary": {
      -        "type": "string"
      -      },
      -      "tool": {
      -        "const": "codex_delegate",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "summary",
      -      "meta"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "error": {
      -        "description": "Populated error envelope; full schema at resource codex://error-envelope",
      -        "type": "object"
      -      },
      -      "meta": {
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": false
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "error",
      -      "meta"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "assumptions": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "diff": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "findings": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "evidence": {
      +              "type": "string"
      +            },
      +            "file": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "line": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "line_end": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "recommendation": {
      +              "type": "string"
      +            },
      +            "risk": {
      +              "type": "string"
      +            },
      +            "severity": {
      +              "enum": [
      +                "critical",
      +                "high",
      +                "medium",
      +                "low",
      +                "nit"
      +              ],
      +              "type": "string"
      +            },
      +            "title": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "severity",
      +            "title",
      +            "evidence",
      +            "risk",
      +            "recommendation"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "meta": {
      +        "description": "Result metadata (cwd, tier, sandbox, model, timeout, usage, rate_limit, and more); full schema at resource codex://result-meta",
      +        "type": "object"
      +      },
      +      "next_steps": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "questions": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "raw_response": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "model": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "session_id": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "text": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "summary": {
      +        "type": "string"
      +      },
      +      "tool": {
      +        "const": "codex_delegate",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "summary",
      +      "meta"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "description": "Populated error envelope; full schema at resource codex://error-envelope",
      +        "type": "object"
      +      },
      +      "meta": {
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": false
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "error",
      +      "meta"
      +    ],
      +    "type": "object"
      +  }
      +]
  5. First observedv0.5.0

TDQS

A4.8/5.0
Behavior5/5

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

The description is unusually thorough: notes the worktree is not applied, that network access is blocked for the model, that files read may be sent to OpenAI, and that results are not resumable after timeout. No annotations are provided, so the description carries full responsibility—and it does so comprehensively.

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?

The description is lengthy but well-organized with clear sections (PAID warning, sandbox behavior, progress/recovery). It front-loads the critical info (reviewable diff not applied, paid cost) and uses formatting like em-dashes and bold to emphasize key points. Slightly verbose but justified by 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 success semantics (diff not applied), cost implication, network restrictions, timeout behavior, recovery via async and job tools, and caveats about model reads/skills. With no output schema provided, the description fully explains what the agent can expect, making it complete.

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?

The input schema already provides high-quality descriptions for each parameter (e.g., 'task' rejection of empty strings, 'model' control character handling, 'detail' verbosity). The description adds value by explaining timeout projection and async fallback in practical terms, though some redundancy exists. Schema coverage is high, so baseline 3, but the additional deadline and recovery context nudges it to 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?

The description precisely states the tool's function: delegating a coding task to Codex in an isolated worktree and returning an unapplied diff. It clearly distinguishes itself from siblings like codex_delegate_dry_run and codex_delegate_async, and flags the paid nature upfront.

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?

Explicitly advises when to use alternatives: use codex_delegate_dry_run first for checking, and codex_delegate_async for long tasks exceeding the timeout. It also clarifies network constraints and when not to use the tool.

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

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