Skip to main content
Glama

codex_run_task

Start an autonomous Codex coding task with a chosen model and workspace directory, then persist the session for viewing, management, or continuation in the Codex Desktop App or CLI.

Instructions

Start a new autonomous Codex coding task with a chosen model and directory. Persists the session in Codex so it can also be viewed, managed, or continued in the Codex Desktop App or CLI.

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_run_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoCodex model to use (e.g. gemini-3.8-flash-high, deepseek-flash, gpt-6.1-sol, gpt-6-astra, etc.).
promptYesDetailed instructions for the Codex coding agent.
sandboxNoSandbox mode (default: danger-full-access).
working_dirNoWorkspace directory root for execution.
timeout_secondsNoTimeout in seconds (default: 300).
dangerously_bypass_approvalsNoSkip confirmation prompts (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the session is persisted and visible in the Codex Desktop App and CLI, and the schema exposes execution-relevant behavior (sandbox modes, timeout, approval bypass). It does not describe the return value or whether the call blocks until completion.

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 tight sentences, front-loaded with the action, followed by the persistence consequence. No filler, though the second sentence mixes behavior with a pointer to other interfaces.

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 six-parameter task-launch tool with no annotations and no output schema, the description covers purpose and persistence but leaves open whether the call is synchronous, what is returned (session/task id), and how long-running work is polled. These gaps matter for correct invocation.

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 coverage is 100% with per-parameter descriptions, so baseline is 3. The description adds only the framing that model and working directory are chosen at launch; defaults and enum meanings are already fully covered by the 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?

States a specific verb and resource ("Start a new autonomous Codex coding task") plus scope details (chosen model and directory). Distinguishes itself from siblings like codex_resume_session and codex_ask_model by being the task-launch entry point.

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 implies this is the tool for initiating new work, and the note about persistence hints that follow-up interaction goes through resume/read tools. However, it never explicitly names alternatives or states when not to use it (e.g., for continuing existing sessions).

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