Skip to main content
Glama

Wait for Codex

codex_wait

Wait for one or all Codex threads to finish or request input, then return their reports.

Instructions

Wait for turns on one or more Codex threads, then return their reports. mode "all" (default) returns when every thread is done or blocked on a request; "any" returns as soon as one is.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "codex_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoall
thread_idNo
thread_idsNoSeveral threads (batch wait).
wait_secondsNoSeconds to block before returning a progress snapshot (default 120). Returns early when the turn finishes or Codex needs an answer. The turn keeps running after this returns.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/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 usefully discloses that this is a blocking call and that a thread can terminate in a 'blocked on a request' state, but it omits timeout behavior, what happens on error, and what the returned 'reports' actually contain.

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 sentences, both front-loaded: the action and return value come first, followed by the mode semantics. No filler, though the mode clause is slightly dense.

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 4-parameter, annotation-free tool with no output schema, the description should explain thread selection and the shape of the returned reports. It covers blocking and termination conditions but leaves the selector ambiguity and report contents unaddressed.

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 only 50%, so the description has to compensate. It clarifies the 'mode' enum semantics beyond the bare enum values, but says nothing about 'thread_id' versus 'thread_ids': it is unclear whether they are mutually exclusive, which wins if both are supplied, and what happens when neither is passed even though required is empty.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: 'Wait for turns on one or more Codex threads, then return their reports.' That is clearly distinct from siblings like codex_run or codex_status. It does not name an alternative explicitly, so it falls short of a 5.

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 defines the two mode behaviors ('all' returns when every thread is done or blocked; 'any' returns on the first one), which implicitly tells an agent which mode to pick for its use case. It gives no explicit guidance on when to prefer this over codex_status or codex_respond, and does not say whether it should be called after codex_run.

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