Skip to main content
Glama

Start Codex Agent

agent_start

Launch a background Codex subagent with a self-contained prompt, returning immediately so it continues working independently while you proceed with other tasks.

Instructions

Dispatch a Codex worker: creates an independent thread and starts its first turn. Returns as soon as the turn is accepted; the worker keeps running in the background whether or not you watch it. Treat this like spawning a background subagent — issue several in one message to run a fleet, alongside any host-native subagents you also want, then go do other work and collect with agent_result. Do not follow this call with agent_wait. The prompt should be a complete, self-contained task including the acceptance criteria, since the worker cannot see your conversation. Common fields are provided directly; threadOptions and turnOptions pass additional app-server fields through, with direct fields taking precedence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoAbsolute working directory for this worker. Defaults to the directory this MCP server was started in, which is usually not the repository you are working on, so pass it explicitly.
labelNoA short supervisor-facing worker label.
modelNoCodex model id. Omit to use the configured default.
configNoThread-scoped Codex config overrides.
effortNoReasoning effort: typically low, medium, high, or ultra when the selected model supports it.
promptYesThe complete initial task for the worker.
sandboxNoFilesystem authority. Use read-only for investigation and review workers; workspace-write only when the worker is meant to edit files.
ephemeralNoLeave no thread log. Ephemeral workers cannot be resumed after this process restarts, and the app-server will not name their in-progress turn, so a timed-out turn is stopped bluntly rather than by id. Prefer the default for anything long-running.
permissionsNoNamed permission profile. Do not combine with sandbox.
personalityNo
serviceTierNoOptional Codex service tier.
turnOptionsNoAdvanced turn/start fields passed through to app-server.
outputSchemaNoJSON Schema constraining the first turn's final response.
threadOptionsNoAdvanced thread/start fields passed through to app-server.
approvalPolicyNoWho approves the worker's commands. on-request surfaces approvals to you via agent_result and agent_request_resolve; never runs unattended within the sandbox.
baseInstructionsNo
approvalsReviewerNo
developerInstructionsNo
runtimeWorkspaceRootsNo
Behavior5/5

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

The description richly discloses async behavior beyond the annotations: 'Returns as soon as the turn is accepted; the worker keeps running in the background whether or not you watch it.' It also explains that the worker cannot see the conversation and that direct fields take precedence over threadOptions/turnOptions pass-through fields. No contradiction with annotations exists.

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?

Every sentence in the description earns its place: it front-loads the core dispatch behavior, then gives usage patterns, an explicit exclusion, a prompt-writing requirement, and pass-through semantics. It is dense but not bloated, and the structure follows a logical decision order.

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 complex 19-parameter tool with no output schema, the description covers the key behavioral contract, usage pattern, prompt requirements, and pass-through precedence. It does not explicitly describe the return payload beyond 'returns as soon as the turn is accepted,' but it points to agent_result for collection, making the missing detail a minor gap rather than a critical one.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 74%, so the schema already documents most parameters. The description adds meaningful parameter context by explaining that the prompt must be a complete, self-contained task including acceptance criteria, and by clarifying that threadOptions and turnOptions pass through additional fields with direct fields taking precedence. It does not detail the few undocumented parameters, but the schema and general guidance are sufficient.

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 opens with a specific verb and resource: 'Dispatch a Codex worker: creates an independent thread and starts its first turn.' It clearly distinguishes this from sibling tools by emphasizing that this is a background start operation and explicitly routing collection to agent_result and warning against agent_wait.

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 gives explicit when-to-use guidance: 'issue several in one message to run a fleet... then go do other work and collect with agent_result. Do not follow this call with agent_wait.' It also explains the prerequisite that the prompt must be self-contained because the worker cannot see the conversation, which is critical for correct invocation.

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

Install Server

Other Tools

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/j-pollack/codex-app-server-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server