Skip to main content
Glama

Run multiple Codex tasks in parallel across workspaces

codex_batch

Execute multiple coding tasks in parallel across distinct workspaces, each with its own directory and configuration, with configurable concurrency limits and continue-on-error or fail-fast modes.

Instructions

Fan out N tasks across N cwds (typically git worktrees) with a bounded concurrency limit. Each task uses its own per-cwd lock, so callers must supply distinct cwds. Returns one result entry per input task in input order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasksYesTasks to run in parallel, one per workspace. Each task uses its own cwd (must be unique in the batch).
failFastNoIf true, cancel remaining tasks on the first failure. Default false (continue-on-error).
maxConcurrencyNoCap on parallel tasks (default 10, hard cap 32).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasksYes
totalYes
failedYes
summaryYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses per-cwd locking, bounded concurrency, and result ordering. However, it could mention error handling behavior (e.g., effect of failFast) or auto-resume on timeout, which is only indirectly hinted via the timeoutMs parameter description.

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?

Two sentences, no filler. The first sentence front-loads the core purpose and mechanism. Every word earns its place.

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?

Given the output schema exists, return values need not be detailed further. The description covers the core mechanism, parallelism, locking, and ordering. It could briefly mention the failFast option to round out behavioral context, but is mostly complete.

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 100%, baseline 3. The description adds value by emphasizing that tasks must use distinct cwds due to per-cwd locks, and that results are returned in input order. This goes beyond the schema's parameter descriptions.

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 uses a specific verb ('fan out') and clearly states the resource (tasks across cwds) and the action (run in parallel with concurrency limit). It distinguishes this from sibling tools by mentioning parallel execution across workspaces and per-cwd locks, implying single-task tools like codex_execute.

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 instructs users that callers must supply distinct cwds, but does not explicitly state when to use this tool vs alternatives like codex_execute. The context of parallel tasks is implied, but no explicit when-not or comparison to siblings is provided.

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/anhnguyen0905/codex-mcp'

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