Skip to main content
Glama

Send a prompt to a Codex thread

send_to_codex_thread
Destructive

Send a prompt as a new user turn inside an existing Codex thread and wait for Codex to answer. Use only for the same unfinished task, including follow-up fixes, clarifications, or results; independent new work belongs in a new conversation…

Instructions

Send a prompt as a new user turn inside an existing Codex thread and wait for Codex to answer. Use only for the same unfinished task, including follow-up fixes, clarifications, or results; independent new work belongs in a new conversation when authorized. The thread keeps its full history, cwd and model. Use list_codex_threads first if you do not know the threadId. Desktop-owned tasks must use Desktop native delivery; an open task is a valid destination. A Desktop send prepares a durable deliveryId before dispatch. An ambiguous acknowledgement is marked unconfirmed, never accepted without evidence. If it times out, continue automatically with wait_codex_reply using that ID; never resend to obtain the answer. If legacy delivery reports an active writer, inspect codex_bridge_status and repair the native relay/configuration. Do not close the task, create a replacement, or ask the user to copy the message manually.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoExpected destination directory; Desktop always checks the verified sender's project and cannot change the task's workspace
nameNoOptional title to show for this Codex session
modelNoOverride the model for this turn
effortNoOverride reasoning effort (default whatever ~/.codex/config.toml says)
promptYesThe message to send to Codex as a new user turn. The prompt for the recipient agent, with an explicit From Codex or From Claude header naming the actual author, all agent-authored text in English including the header purpose, and the sections Goal, Context, Task, Scope, Constraints, Done when, Reply format (omit any that do not apply); text the user supplied is sent verbatim
threadIdYesCodex thread id (UUID) - get it from list_codex_threads
openInAppNoOpen the thread in Codex Desktop on Windows or macOS so a human can watch it live
timeoutSecNoHow long to observe the task (Desktop caps the entire call at 40s; the task continues and its threadId is returned)
releaseAfterTurnNoUnsubscribe this thread after a terminal turn; open Desktop only after its unload is confirmed

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.22.2
    • changedInput schema / properties / prompt / description
      Previous value: -"The message to send to Codex as a new user turn. The prompt for the recipient agent, in English with the sections Goal, Context, Task, Scope, Constraints, Done when, Reply format (omit any that do not apply); text the user supplied is sent verbatim"New value: +"The message to send to Codex as a new user turn. The prompt for the recipient agent, with an explicit From Codex or From Claude header naming the actual author, all agent-authored text in English including the header purpose, and the sections Goal, Context, Task, Scope, Constraints, Done when, Reply format (omit any that do not apply); text the user supplied is sent verbatim"
  2. Changed1 schema field changedv1.19.3
    • changedInput schema / properties / cwd / description
      Previous value: -"Override the working directory for this turn"New value: +"Expected destination directory; Desktop always checks the verified sender's project and cannot change the task's workspace"
  3. Changed1 schema field changedv1.18.0
    • changedInput schema / properties / prompt / description
      Previous value: -"The message to send to Codex, exactly as a user would type it"New value: +"The message to send to Codex as a new user turn. The prompt for the recipient agent, in English with the sections Goal, Context, Task, Scope, Constraints, Done when, Reply format (omit any that do not apply); text the user supplied is sent verbatim"
  4. Changed1 schema field changed
    • changedInput schema / properties / timeoutSec / description
      Previous value: -"How long to wait for the turn to finish (default 240s)"New value: +"How long to observe the task (Desktop caps the entire call at 40s; the task continues and its threadId is returned)"
  5. Changed1 schema field changedv1.12.3
    • changedInput schema / properties / releaseAfterTurn / description
      Previous value: -"Stop the bridge app-server after a terminal turn so Codex Desktop owns the writer lock"New value: +"Unsubscribe this thread after a terminal turn; open Desktop only after its unload is confirmed"
  6. First observedv1.11.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the mutating/open-world/destructive profile; the description adds substantially more: a durable deliveryId is prepared before dispatch, ambiguous acknowledgements are marked unconfirmed, timeouts must be continued via wait_codex_reply rather than resent, and active-writer conflicts require codex_bridge_status. It also states explicit prohibitions (do not close the task, do not resend, do not ask the user to copy manually), which directly operationalizes the non-idempotent/destructive hints.

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?

Purpose and the same-task constraint are front-loaded in the first two sentences, with recovery procedures after. It is dense and roughly 180 words for a 9-parameter stateful tool, so a couple of sentences could be trimmed, but nearly every clause is actionable rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating, non-idempotent, 9-parameter tool with no output schema and heavy delivery-state complexity, the description covers failure modes, timeout continuation, acknowledgement ambiguity, and recovery paths. An agent has everything it needs to invoke and recover correctly.

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 the baseline is 3 and the schema already documents threadId, cwd, prompt, timeout, and release semantics. The description adds only marginal parameter-level meaning (e.g., the cwd project check, the threadId discovery hint, the deliveryId that feeds wait_codex_reply) and is silent on name, model, effort, and openInApp.

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 first sentence states a specific verb and resource ('Send a prompt as a new user turn inside an existing Codex thread and wait for Codex to answer'). It distinguishes itself from siblings like start_codex_thread and delegate_to_codex by scoping to an *existing* thread. An agent can select it without opening any schema.

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?

It gives explicit when-to-use ('same unfinished task, including follow-up fixes, clarifications, or results') and when-not ('independent new work belongs in a new conversation'). It also names concrete alternatives for adjacent needs: list_codex_threads for discovery, wait_codex_reply for timeouts, codex_bridge_status for legacy writer problems.

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