Skip to main content
Glama

delegate

Destructive

Submit coding tasks to OpenAI Codex for implementation, then check run status before trusting the result.

Instructions

Delegate a coding task to OpenAI Codex. Never run codex from the shell — use this tool. Check status before trusting result — a run that spawns then fails returns normally. Keep model, reasoningEffort and fast at their defaults unless the user asks. See the delegate skill.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fastNoCodex Fast mode; higher credit use.
modeNoagent implements; plan returns a structured plan; ask answers; review runs native review.agent
specYesBrief with goal, scope, fixed decisions quoted exactly, and acceptance criteria; reference files instead of pasting code.
modelNoCodex model id. doctor deep:true lists every id.gpt-6-luna
timeoutMsNoWhole-run cap in ms (default 1h). Mid-turn silence is allowed; startup has a separate 60s first-output deadline.
webSearchNoCodex's built-in web search.
workspaceYesCodex's working directory; not confinement. Must already exist — never create one for the call.
reviewTargetNoRequired in review; forbidden otherwise: uncommitted, base branch, or commit.
resumeThreadIdNoThread to continue. Reuse its workspace. Forbidden with review.
reasoningEffortNoCodex reasoning level. doctor deep:true lists each model's levels.xhigh

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.5.0
    • changedInput schema / properties / model / default
      Previous value: -"gpt-5.6-luna"New value: +"gpt-6-luna"
    • changedInput schema / properties / model / description
      Previous value: -"Codex model id: gpt-5.6-luna, gpt-6-luna, gpt-6-sol, gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.5."New value: +"Codex model id. doctor deep:true lists every id."
    • changedInput schema / properties / reasoningEffort / description
      Previous value: -"minimal is rejected by every published model; none is rejected by gpt-6-astra and accepted elsewhere, though the catalog omits it."New value: +"Codex reasoning level. doctor deep:true lists each model's levels."
    • removedInput schema / properties / reasoningEffort / enum
      Removed value: -[
      -  "none",
      -  "minimal",
      -  "low",
      -  "medium",
      -  "high",
      -  "xhigh",
      -  "max",
      -  "ultra"
      -]
    • removedInput schema / properties / reviewTarget / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "kind": {
      -        "const": "uncommitted",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "branch": {
      -        "type": "string"
      -      },
      -      "kind": {
      -        "const": "base",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "branch"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "kind": {
      -        "const": "commit",
      -        "type": "string"
      -      },
      -      "sha": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "sha"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / reviewTarget / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "uncommitted",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "branch": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "const": "base",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "branch"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "commit",
      +        "type": "string"
      +      },
      +      "sha": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "sha"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed2 schema fields changedv2.3.0
    • changedInput schema / properties / model / description
      Previous value: -"Codex model id: gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.5, gpt-5.4, gpt-5.4-mini."New value: +"Codex model id: gpt-5.6-luna, gpt-6-luna, gpt-6-sol, gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.5."
    • changedInput schema / properties / reasoningEffort / description
      Previous value: -"minimal is rejected by every published model; none is accepted though the catalog omits it."New value: +"minimal is rejected by every published model; none is rejected by gpt-6-astra and accepted elsewhere, though the catalog omits it."
  3. Changed1 schema field changedv2.2.1
    • changedInput schema / properties / reasoningEffort / description
      Previous value: -"gpt-5.6-* reject minimal; older models reject none."New value: +"minimal is rejected by every published model; none is accepted though the catalog omits it."
  4. Changed6 schema fields changedv2.0.0
    • changedInput schema / properties / model / default
      Previous value: -"gpt-5.6-terra"New value: +"gpt-5.6-luna"
    • changedInput schema / properties / model / description
      Previous value: -"Codex model id: gpt-5.6-terra, gpt-5.6-sol, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini and more."New value: +"Codex model id: gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.5, gpt-5.4, gpt-5.4-mini."
    • changedInput schema / properties / reasoningEffort / default
      Previous value: -"high"New value: +"xhigh"
    • changedInput schema / properties / reasoningEffort / enum
      Previous value: -[
      -  "none",
      -  "minimal",
      -  "low",
      -  "medium",
      -  "high",
      -  "xhigh",
      -  "max"
      -]New value: +[
      +  "none",
      +  "minimal",
      +  "low",
      +  "medium",
      +  "high",
      +  "xhigh",
      +  "max",
      +  "ultra"
      +]
    • changedInput schema / properties / workspace / description
      Previous value: -"Codex's working directory; not confinement. Must already exist — never create one for the call. Defaults to the server cwd, often not the project root under npx/plugin. Required on resume: resume has no --cd."New value: +"Codex's working directory; not confinement. Must already exist — never create one for the call."
    • changedInput schema / required
      Previous value: -[
      -  "spec"
      -]New value: +[
      +  "spec",
      +  "workspace"
      +]
  5. Changed11 schema fields changedv1.21.1
    • changedInput schema / properties / fast / description
      Previous value: -"Codex Fast mode (service_tier=fast) — higher credit use"New value: +"Codex Fast mode; higher credit use."
    • addedInput schema / properties / mode / description
      Added value: +"agent implements; plan returns a structured plan; ask answers; review runs native review."
    • changedInput schema / properties / model / description
      Previous value: -"Codex model id"New value: +"Codex model id: gpt-5.6-terra, gpt-5.6-sol, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini and more."
    • removedInput schema / properties / network
      Removed value: -{
      -  "default": true,
      -  "description": "Web search, and network from Codex's shell in agent mode. false seals the run",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / reasoningEffort / description
      Previous value: -"Reasoning effort. gpt-5.6-* reject minimal; older models reject none"New value: +"gpt-5.6-* reject minimal; older models reject none."
    • changedInput schema / properties / resumeThreadId / description
      Previous value: -"Resume an existing Codex thread instead of starting a new one"New value: +"Thread to continue. Reuse its workspace. Forbidden with review."
    • changedInput schema / properties / reviewTarget / description
      Previous value: -"Required in review mode: uncommitted, base branch, or commit sha"New value: +"Required in review; forbidden otherwise: uncommitted, base branch, or commit."
    • changedInput schema / properties / spec / description
      Previous value: -"Task brief: goal, scope, decisions already made (quote the user's exact values), acceptance criteria. Point at files to read rather than pasting code."New value: +"Brief with goal, scope, fixed decisions quoted exactly, and acceptance criteria; reference files instead of pasting code."
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"Hard-cap timeout in milliseconds (default 1h). A long silent command is not a timeout; only the 60s spawn-to-first-output deadline is."New value: +"Whole-run cap in ms (default 1h). Mid-turn silence is allowed; startup has a separate 60s first-output deadline."
    • addedInput schema / properties / webSearch
      Added value: +{
      +  "default": true,
      +  "description": "Codex's built-in web search.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / workspace / description
      Previous value: -"Working directory for Codex. Optional; defaults to the server process cwd, which for npx and plugin launches is not necessarily your project root — pass it explicitly. Smallest directory holding the task's files; none → project root. Must already exist — never create one for the call. Required when resuming: codex exec resume has no --cd."New value: +"Codex's working directory; not confinement. Must already exist — never create one for the call. Defaults to the server cwd, often not the project root under npx/plugin. Required on resume: resume has no --cd."
  6. Changed3 schema fields changedv1.18.1
    • changedInput schema / properties / reasoningEffort / enum
      Previous value: -[
      -  "none",
      -  "minimal",
      -  "low",
      -  "medium",
      -  "high",
      -  "xhigh"
      -]New value: +[
      +  "none",
      +  "minimal",
      +  "low",
      +  "medium",
      +  "high",
      +  "xhigh",
      +  "max"
      +]
    • changedInput schema / properties / workspace / description
      Previous value: -"Working directory for Codex (defaults to cwd)"New value: +"Working directory for Codex. Optional; defaults to the server process cwd, which for npx and plugin launches is not necessarily your project root — pass it explicitly. Smallest directory holding the task's files; none → project root. Must already exist — never create one for the call. Required when resuming: codex exec resume has no --cd."
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": true,
      -  "properties": {
      -    "cliVersion": {
      -      "type": "string"
      -    },
      -    "delegationId": {
      -      "type": "string"
      -    },
      -    "exitCode": {
      -      "type": "integer"
      -    },
      -    "filesReportedByEditTools": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "plan": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "overview": {
      -          "type": "string"
      -        },
      -        "steps": {
      -          "items": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "detail": {
      -                "type": "string"
      -              },
      -              "title": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "title",
      -              "detail"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        }
      -      },
      -      "required": [
      -        "overview",
      -        "steps"
      -      ],
      -      "type": "object"
      -    },
      -    "reason": {
      -      "enum": [
      -        "cancelled",
      -        "startup-timeout",
      -        "hard-cap",
      -        "agent-error",
      -        "died-mid-turn",
      -        "exit-nonzero"
      -      ],
      -      "type": "string"
      -    },
      -    "result": {
      -      "type": "string"
      -    },
      -    "resultSource": {
      -      "const": "stream-fallback",
      -      "type": "string"
      -    },
      -    "resumed": {
      -      "type": "boolean"
      -    },
      -    "status": {
      -      "enum": [
      -        "completed",
      -        "failed",
      -        "interrupted"
      -      ],
      -      "type": "string"
      -    },
      -    "threadId": {
      -      "type": "string"
      -    },
      -    "usage": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "cacheWriteInputTokens": {
      -          "type": "number"
      -        },
      -        "cachedInputTokens": {
      -          "type": "number"
      -        },
      -        "inputTokens": {
      -          "type": "number"
      -        },
      -        "outputTokens": {
      -          "type": "number"
      -        },
      -        "reasoningOutputTokens": {
      -          "type": "number"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "warnings": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "workspace": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result",
      -    "status",
      -    "workspace"
      -  ],
      -  "type": "object"
      -}New value: +null
  7. Changed1 schema field changedv1.14.1
    • addedOutput schema / properties / delegationId
      Added value: +{
      +  "type": "string"
      +}
  8. First observedv1.11.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructive/openWorld/non-idempotent, so the bar is lower, and the description still adds high-value behavior: a run that spawns then fails returns normally, so the agent must poll status rather than trust the return. It does not explain result shape, but that is largely covered by the schema's timeout/workspace semantics.

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?

Five short sentences, front-loaded with purpose, then the routing rule, then the failure trap, then the defaults caveat, then a pointer to deeper docs. Every sentence carries a distinct instruction with no padding.

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

Completeness4/5

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

For a 10-parameter destructive, open-world tool with no output schema, the description supplies the critical operational nuance (async failure mode, do-not-use-shell, don't override defaults) and defers detail to the delegate skill. Adequate, though a hint about latency/ongoing-run handling or auth expectations would round it out.

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 description coverage is 100% and every parameter already documents its meaning, defaults, and constraints (workspace must exist, timeout semantics, reviewTarget exclusivity). The description only restates the default-preservation advice for model/reasoningEffort/fast, adding no syntax or format detail beyond the schema — baseline 3.

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?

States a specific verb and resource ('Delegate a coding task to OpenAI Codex') and immediately scopes it against the competing approach ('Never run codex from the shell — use this tool'). It is unmistakably distinct from the siblings cancel and doctor.

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?

Gives an explicit routing rule away from the shell and a pre-condition for trusting output ('Check status before trusting result'), plus default-preservation guidance for model/reasoningEffort/fast. It stops short of stating when this tool is preferred over cancel/doctor, though those are self-evidently different operations.

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