Skip to main content
Glama

Run multiple Codex tasks in parallel across workspaces

codex_batch

Fan out multiple coding tasks across separate worktrees, running them in parallel with a bounded concurrency limit and returning results per input task.

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 concurrency limits, per-cwd locks, the need for distinct cwds, and ordered results. It does not mention error handling beyond the schema's failFast parameter, but provides key behavioral context.

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?

The description is two sentences, front-loaded with purpose, and every word contributes meaning. No filler or unnecessary detail.

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, the description covers return format (ordered results). The three parameters are well-documented in the schema. The description is complete enough for an agent to understand the tool's core behavior, though it omits discussion of failFast and maxConcurrency.

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 baseline is 3. The description restates the distinct cwds constraint but adds no new parameter semantics beyond what the schema already provides.

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 the tool fans out N tasks across N cwds, which is a specific verb+resource. The title reinforces 'Run multiple Codex tasks in parallel across workspaces,' distinguishing it from single-task siblings 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 Guidelines4/5

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

The description implies usage for parallel tasks across distinct cwds, and warns that callers must supply distinct cwds. However, it does not explicitly contrast with single-task alternatives or state when not to use it.

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