Skip to main content
Glama

Dispatch Backend Execution to Codex

codex_exec_backend

Dispatch a backend implementation and unit-testing task to the local Codex CLI with sandboxed writes, session resume, and worktree isolation. Auto-detaches before MCP timeout.

Instructions

Dispatch a self-contained, interface-locked backend implementation and unit-testing task to the local Codex CLI (GPT 6.2-sol) using --sandbox workspace-write. Supports resume_session_id, use_worktree, and auto-detaches before MCP timeout with wait_cmd for reactive wakeup.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "codex_exec_backend"
  }
}

Input Schema

NameRequiredDescriptionDefault
asyncNoIf true, return immediately with run_id and wait_cmd for reactive wakeup via run_command (recommended for backend coding).
titleNoShort task title shown in the AI Hub dashboard.
promptYesDetailed backend implementation instructions.
workdirNoAbsolute working directory path.
test_cmdNoOptional test command Codex should run before finishing.
timeout_secNoTimeout in seconds (default 1200).
use_worktreeNoOptional: run fresh Codex exec in a new isolated git worktree.
contract_pathNoOptional path to shared API contract file.
soft_wait_secNoMax seconds to wait synchronously before auto-detaching (default 25, max 120, 0 = immediate async).
resume_session_idNoOptional previous Codex thread_id to resume rework without losing context.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does meaningful work: it discloses the sandbox permission level (--sandbox workspace-write), the execution model (local Codex CLI, GPT 6.2-sol), worktree isolation as an option, and the auto-detach-before-MCP-timeout behavior with wait_cmd for reactive wakeup. It does not cover what the task can modify beyond workspace-write, auth prerequisites, or failure modes.

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?

Two dense sentences, front-loaded with the capability and followed by the operational knobs. There is no filler, though the parenthetical model name and flag syntax are close to jargon that does not aid tool selection.

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

Completeness3/5

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

For a 10-parameter mutation-style dispatch tool with no annotations and no output schema, the description covers execution environment and timeout behavior well but says little about what comes back (run_id shape, whether it returns the diff or test output) or about concurrency and cost. Adequate but with real gaps against the tool's complexity.

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 every one of the 10 parameters is already documented in the input schema; the baseline of 3 applies. The description only resurfaces resume_session_id, use_worktree, and async/detach, adding no syntax or semantic detail (e.g., contract_path format, test_cmd exit-code behavior) beyond the schema.

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

Purpose4/5

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

The description states a specific verb and resource: dispatching a 'self-contained, interface-locked backend implementation and unit-testing task' to a named execution backend, with the model and sandbox mode spelled out. It implicitly distinguishes itself from codex_plan_backend by emphasizing implementation rather than planning, but never names that sibling explicitly.

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

Usage Guidelines3/5

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

Preconditions are embedded in the wording ('self-contained, interface-locked' - implying a contract must be fixed first, consistent with the contract_path param) and the schema notes async is 'recommended for backend coding.' However, there is no explicit statement of when to prefer this over codex_plan_backend, app_quick_dispatch, or codex_review, and no when-not guidance.

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