Skip to main content
Glama

Send a prompt to a Codex thread

send_to_codex_thread
Destructive

Send a follow-up prompt into an existing Codex thread to continue the same unfinished task, preserving its 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. 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. 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, 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
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.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"
  2. 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"
  3. 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)"
  4. 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"
  5. First observedv1.11.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructive=true, non-idempotent and open-world, so the mutation/safety profile is partially covered. The description adds real context beyond that: the thread retains full history, cwd and model; Desktop-owned tasks must use Desktop delivery; and a legacy 'active writer' failure has a recovery path via codex_bridge_status. It stops short of describing what a wait/timeout actually returns.

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 core purpose and applicability rule lead the paragraph, and the negative instruction ('Do not close the task, create a replacement, or ask the user to copy the message manually') is a useful closer. It is dense with operational detail by necessity, but a couple of sentences about legacy relay repair sit awkwardly mid-paragraph.

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 9-parameter, no-output-schema orchestration tool in a multi-agent setup, the description covers selection, persistence semantics, Desktop constraints, and failure recovery. Return handling is only implied (the schema notes a 40s cap that still returns a threadId), and the 'wait' behavior on non-Desktop paths is not spelled out, but the essentials are present.

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% and all 9 params (including the effort enum range and the 40s Desktop cap) are documented in the schema itself. The description only marginally re-frames cwd/model/name via 'the thread keeps its full history, cwd and model,' so it does not add meaning beyond the structured fields. The baseline 3 applies.

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 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 start_codex_thread by insisting on 'inside an existing Codex thread' and from delegate_to_codex by tying it to 'the same unfinished task.' An agent can select it without opening the 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?

Explicit when-to-use ('the same unfinished task, including follow-up fixes, clarifications, or results') and when-not-to-use ('independent new work belongs in a new conversation when authorized'), plus a prerequisite ('Use list_codex_threads first if you do not know the threadId'). It also routes Desktop-owned tasks to native delivery, naming the alternative path.

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