Skip to main content
Glama

codex_execute

Launch an autonomous Codex subagent to handle coding, refactoring, testing, and file edits, streaming progress and tracking token savings.

Instructions

Spins up an OpenAI Codex subagent to autonomously execute coding, refactoring, testing, and file editing tasks with live streaming progress and token savings tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asyncNoRun task asynchronously in background. RECOMMENDED in Claude Desktop for tasks taking >45s to avoid 60s client timeouts. Check status with codex_check_task or agy_check_task.
modelNoModel to use for Codex (e.g. gpt-5.6-luna, gpt-5.6-terra, gpt-reserve). Default is gpt-5.6-luna.gpt-5.6-luna
sandboxNoSandbox policy for command execution.danger-full-access
instructionsYesDetailed step-by-step instructions for Codex subagent. Specify target paths, constraints, and requirements.
workspace_dirNoTarget workspace directory path (MANDATORY in Claude Desktop to point to the project repo). Defaults to current working directory.
timeout_secondsNoMax execution time in seconds (default: 600).
include_git_diffNoInclude git status and diff statistics of modified files.
reasoning_effortNoReasoning effort for Codex model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions autonomous execution and live streaming/token tracking, but it does not disclose potential side effects such as modifying files, executing arbitrary commands, or the implications of the sandbox setting (e.g., danger-full-access). It also doesn't explain whether the subagent can make irreversible changes or what happens on failure. This is a significant gap for a tool that can modify a workspace.

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 a single, well-structured sentence that conveys the primary function without redundancy. It is front-loaded with the action ('Spins up an OpenAI Codex subagent') and lists task types succinctly. No wasted words, though it could potentially mention a key usage caveat without becoming verbose.

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

Completeness2/5

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

The tool has 8 parameters, no output schema, and no annotations, so the description must compensate for missing context. It fails to explain what the tool returns (e.g., progress updates, token savings data, or final output), how 'live streaming' manifests in practice, or the significance of the sandbox options. It also omits the mandatory workspace_dir requirement in Claude Desktop (present in schema but not description). An agent would not have enough information to call this correctly without reading the schema in full, making the description insufficient for 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 each parameter already has its own description in the schema. The tool description adds no extra parameter-level detail beyond what the schema provides. For instance, it doesn't clarify how 'instructions' should be formatted or what 'workspace_dir' should point to, though the schema already covers those. Since coverage is high, a baseline of 3 is appropriate, and the description does not enhance it.

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 clearly states a specific action: spinning up an OpenAI Codex subagent to execute coding, refactoring, testing, and file editing tasks. It names the resource and the types of tasks, distinguishing it from generic 'process' or 'execute' tools. The mention of 'Codex' and 'subagent' differentiates it from siblings like agy_execute or codex_continue.

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?

The description itself provides no explicit when-to-use guidance or exclusions relative to sibling tools. However, the input schema's async parameter includes a recommendation for Claude Desktop and mentions checking status with codex_check_task or agy_check_task, which gives some indirect usage context. Still, the description does not directly state when this tool should be preferred over alternatives, so guidance is implied rather than explicit.

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