Skip to main content
Glama

Delegate in background (paid)

codex_delegate_async
Destructive

Submit a coding task to run in the background, get a job ID instantly, and retrieve a reviewable diff later without blocking or timeout losing partial work.

Instructions

Delegate a coding task to Codex in the background and get a job_id back immediately (does not block on the run).

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.

Same propose-tier behavior as codex_delegate — Codex works in a throwaway git worktree and the result carries a reviewable diff that is NOT applied — but detached; prefer it for a substantial or multi-file implementation task that can exceed the synchronous deadline (built-in default 300s), since a sync run whose deadline expires loses its partial work (this job's own deadline is separately configured, built-in default 1800s). Starting a job commits to spend (it runs to completion or its wall-clock deadline even if you never poll). Poll codex_job_status; read/consume with codex_job_result/codex_job_consume_result; stop with codex_job_cancel. Requires a git repo with at least one commit; pass workspace_root (absolute).

NO NETWORK: like codex_delegate, this runs under workspace-write, which blocks network egress for commands Codex RUNS in the sandbox — the task must be self-contained (no push/fetch/gh/curl/publish/dependency install; those fail with a DNS/host-resolution error in the sandbox). This does NOT mean nothing leaves the machine: the Codex model call still sends your task (raw) 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. 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. Secret redaction is best-effort and does not cover your task or files Codex reads itself.

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.
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.
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. Changed6 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."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "deadline_seconds": {
      -        "type": "integer"
      -      },
      -      "expires_at": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "fingerprint": {
      -        "type": "string"
      -      },
      -      "job_id": {
      -        "type": "string"
      -      },
      -      "kind": {
      -        "type": "string"
      -      },
      -      "meta": {
      -        "description": "Result metadata (cwd, tier, sandbox, model, timeout, usage, rate_limit, and more); full schema at resource codex://result-meta",
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "poll_after_ms": {
      -        "type": "integer"
      -      },
      -      "server_version": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "started_at": {
      -        "type": "string"
      -      },
      -      "status": {
      -        "enum": [
      -          "running",
      -          "done",
      -          "failed",
      -          "cancelled",
      -          "timeout"
      -        ],
      -        "type": "string"
      -      },
      -      "ttl_seconds": {
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "job_id",
      -      "kind",
      -      "started_at",
      -      "deadline_seconds",
      -      "ttl_seconds",
      -      "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": {
      +      "deadline_seconds": {
      +        "type": "integer"
      +      },
      +      "expires_at": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "fingerprint": {
      +        "type": "string"
      +      },
      +      "follow_up": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "alternative": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "arguments": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "next_step": {
      +            "enum": [
      +              "retry_after_delay",
      +              "correct_arguments",
      +              "use_allowed_value",
      +              "reduce_input",
      +              "use_workspace_in_roots",
      +              "poll_job_status",
      +              "list_jobs",
      +              "list_resources",
      +              "start_new_job",
      +              "authenticate",
      +              "install_codex",
      +              "install_git",
      +              "init_git_repo",
      +              "update_plugin",
      +              "correct_config",
      +              "inspect_and_retry",
      +              "retry_then_report",
      +              "use_new_idempotency_key"
      +            ],
      +            "type": "string"
      +          },
      +          "tool": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "next_step"
      +        ],
      +        "type": "object"
      +      },
      +      "job_id": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "type": "string"
      +      },
      +      "meta": {
      +        "description": "Result metadata (cwd, tier, sandbox, model, timeout, usage, rate_limit, and more); full schema at resource codex://result-meta",
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "poll_after_ms": {
      +        "type": "integer"
      +      },
      +      "server_version": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "started_at": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "running",
      +          "done",
      +          "failed",
      +          "cancelled",
      +          "timeout"
      +        ],
      +        "type": "string"
      +      },
      +      "ttl_seconds": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "job_id",
      +      "kind",
      +      "started_at",
      +      "deadline_seconds",
      +      "ttl_seconds",
      +      "meta",
      +      "follow_up"
      +    ],
      +    "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"
      +  }
      +]
  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. Changed1 schema field changedv0.11.0
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "deadline_seconds": {
      -        "type": "integer"
      -      },
      -      "expires_at": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "fingerprint": {
      -        "type": "string"
      -      },
      -      "job_id": {
      -        "type": "string"
      -      },
      -      "kind": {
      -        "type": "string"
      -      },
      -      "meta": {
      -        "description": "Result metadata (cwd, tier, sandbox, model, timeout, usage, rate_limit, and more); full schema at resource codex://result-meta",
      -        "type": "object"
      -      },
      -      "ok": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "poll_after_ms": {
      -        "type": "integer"
      -      },
      -      "started_at": {
      -        "type": "string"
      -      },
      -      "status": {
      -        "enum": [
      -          "running",
      -          "done",
      -          "failed",
      -          "cancelled",
      -          "timeout"
      -        ],
      -        "type": "string"
      -      },
      -      "ttl_seconds": {
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "job_id",
      -      "kind",
      -      "started_at",
      -      "deadline_seconds",
      -      "ttl_seconds",
      -      "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": {
      +      "deadline_seconds": {
      +        "type": "integer"
      +      },
      +      "expires_at": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "fingerprint": {
      +        "type": "string"
      +      },
      +      "job_id": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "type": "string"
      +      },
      +      "meta": {
      +        "description": "Result metadata (cwd, tier, sandbox, model, timeout, usage, rate_limit, and more); full schema at resource codex://result-meta",
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "poll_after_ms": {
      +        "type": "integer"
      +      },
      +      "server_version": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "started_at": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "running",
      +          "done",
      +          "failed",
      +          "cancelled",
      +          "timeout"
      +        ],
      +        "type": "string"
      +      },
      +      "ttl_seconds": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "job_id",
      +      "kind",
      +      "started_at",
      +      "deadline_seconds",
      +      "ttl_seconds",
      +      "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. 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": {
      -      "deadline_seconds": {
      -        "type": "integer"
      -      },
      -      "expires_at": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "fingerprint": {
      -        "type": "string"
      -      },
      -      "job_id": {
      -        "type": "string"
      -      },
      -      "kind": {
      -        "type": "string"
      -      },
      -      "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"
      -      },
      -      "ok": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "poll_after_ms": {
      -        "type": "integer"
      -      },
      -      "started_at": {
      -        "type": "string"
      -      },
      -      "status": {
      -        "enum": [
      -          "running",
      -          "done",
      -          "failed",
      -          "cancelled",
      -          "timeout"
      -        ],
      -        "type": "string"
      -      },
      -      "ttl_seconds": {
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "job_id",
      -      "kind",
      -      "started_at",
      -      "deadline_seconds",
      -      "ttl_seconds",
      -      "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": {
      +      "deadline_seconds": {
      +        "type": "integer"
      +      },
      +      "expires_at": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "fingerprint": {
      +        "type": "string"
      +      },
      +      "job_id": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "type": "string"
      +      },
      +      "meta": {
      +        "description": "Result metadata (cwd, tier, sandbox, model, timeout, usage, rate_limit, and more); full schema at resource codex://result-meta",
      +        "type": "object"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "poll_after_ms": {
      +        "type": "integer"
      +      },
      +      "started_at": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "running",
      +          "done",
      +          "failed",
      +          "cancelled",
      +          "timeout"
      +        ],
      +        "type": "string"
      +      },
      +      "ttl_seconds": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "job_id",
      +      "kind",
      +      "started_at",
      +      "deadline_seconds",
      +      "ttl_seconds",
      +      "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"
      +  }
      +]
  6. First observedv0.5.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already say destructiveHint=true and openWorldHint=true, but the description goes far beyond them. It discloses quota spend, that jobs run to completion even if never polled, blocked network egress, reading of files outside the workspace, temp-root write behavior, AGENTS.md/skills auto-loading, and best-effort secret redaction. No contradiction exists between the description and the annotations.

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 long but front-loaded with the core purpose and paid warning, and every subsequent block addresses a critical behavioral or security aspect. It is not padded with fluff, though a slightly tighter organization (e.g., bullet-like separation of the network and file-read caveats) could improve scannability. The length is justified by the tool's 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?

Given the rich input schema, output schema, and annotations, the description is exceptionally complete. It covers cost, deadlines, worktree behavior, sandbox network restrictions, file-read and temp-write semantics, AI context loading, secrets handling, and the full job lifecycle, leaving nothing an agent needs in order to call the tool correctly.

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%, so the schema already documents all six parameters. The description adds some useful context (e.g., `workspace_root` is not a read boundary, `task` must be non-blank), but it does not need to compensate for missing schema documentation. This meets the baseline for a fully covered schema.

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 first sentence states a specific verb ('Delegate a coding task to Codex in the background') and the immediate return of a `job_id`, clearly distinguishing it from synchronous `codex_delegate`. It also differentiates from free siblings (`codex_delegate_dry_run`, `codex_status`) by flagging the paid nature, so an agent can select it correctly without ambiguity.

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?

The description explicitly says when to use this tool ('substantial or multi-file implementation task that can exceed the synchronous deadline') and when not to (use `codex_delegate_dry_run` or `codex_status` first for scope/readiness checks). It also names the full lifecycle tools (`codex_job_status`, `codex_job_result`, `codex_job_consume_result`, `codex_job_cancel`) and gives a hard prerequisite: a git repo with at least one commit and `workspace_root` passed.

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