Skip to main content
Glama

Send a prompt to a Codex thread

send_to_codex_thread
Destructive

Send a prompt into an existing Codex thread to continue the conversation while preserving its full history, working directory, and model.

Instructions

Send a prompt as a new user turn inside an existing Codex thread and wait for Codex to answer. 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. 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
cwdNoOverride the working directory for this turn
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, exactly as a user would type it
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 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)"
  2. 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"
  3. First observedv1.11.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false. The description adds meaningful behavioral context: it waits for Codex to answer, preserves thread history/cwd/model, warns against closing the task, and explains the timeout behavior. It also details desktop delivery constraints and repair steps. This goes beyond the annotations without contradiction.

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?

The description is moderately long but every sentence contributes: it states the action, gives usage guidance, lists constraints, and provides an error-handling path. It is front-loaded with the primary purpose and structured logically. It is not overly verbose, though it could be trimmed slightly without losing meaning.

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 tool with 9 parameters and no output schema, the description covers usage, constraints, and error handling. It does not explicitly describe the return format, but the phrase 'wait for Codex to answer' implies the answer is returned. The description also addresses edge cases like desktop delivery and timeouts. The only minor gap is the lack of an explicit return type, but this is likely inferred.

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%, so the baseline is 3. The description adds value by explaining that threadId comes from list_codex_threads, that cwd and model are overrides for the thread's defaults (since the thread keeps its own), and that timeoutSec is capped at 40s on Desktop with the task continuing. It does not explain releaseAfterTurn, but the parameter name and schema description cover it. Overall, it enhances parameter understanding beyond the schema.

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 states a specific action ('send a prompt as a new user turn inside an existing Codex thread'), identifies the resource (prompt) and the destination (existing thread), and implicitly distinguishes from siblings by emphasizing 'existing' and pointing to list_codex_threads for threadId discovery. It is clear and unambiguous.

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 explicitly instructs to use list_codex_threads when threadId is unknown, specifies the condition for Desktop-owned tasks (must use native delivery), and gives a fallback action when legacy delivery reports an active writer (inspect codex_bridge_status). This provides clear when-to-use and when-not-to-use guidance with alternatives.

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