Skip to main content
Glama

Start a new Codex thread

start_codex_thread
Destructive

Starts a new Codex task in a specified working directory for independent work, optionally creating an atomic visible Desktop task with an initial prompt and request ID.

Instructions

Start a new Codex task when the user explicitly or through standing instructions authorizes a new conversation for independent work. In Desktop mode include the initial prompt and a fresh requestId to create and assign a visible task atomically; keep requestId unchanged on retries. Continue unfinished work with send_to_codex_thread and its original threadId. Use delegate_to_codex to also wait for its reply.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cwd": "<cwd>"
    },
    "name": "start_codex_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesAbsolute working directory for the new Codex session
nameNoOptional title to show for the new Codex session
modelNoModel override, e.g. gpt-5.6-luna
promptNoInitial task; required with CODEX_BRIDGE_DESKTOP_TASKS=1, starts immediately. 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
requestIdNoDesktop creation identity: fresh UUID per independent task, same UUID on retries. Omit only for legacy title/prompt deduplication. Not supported in legacy app-server mode.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.23.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / requestId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. Changed1 schema field changedv1.22.2
    • changedInput schema / properties / prompt / description
      Previous value: -"Initial task; required with CODEX_BRIDGE_DESKTOP_TASKS=1, starts immediately. 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: +"Initial task; required with CODEX_BRIDGE_DESKTOP_TASKS=1, starts immediately. 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"
  3. Changed1 schema field changedv1.19.3
    • addedInput schema / properties / requestId
      Added value: +{
      +  "description": "Desktop creation identity: fresh UUID per independent task, same UUID on retries. Omit only for legacy title/prompt deduplication. Not supported in legacy app-server mode.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv1.18.0
    • changedInput schema / properties / prompt / description
      Previous value: -"Initial task; required with CODEX_BRIDGE_DESKTOP_TASKS=1, starts immediately"New value: +"Initial task; required with CODEX_BRIDGE_DESKTOP_TASKS=1, starts immediately. 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"
  5. Changed1 schema field changed
    • addedInput schema / properties / prompt
      Added value: +{
      +  "description": "Initial task; required with CODEX_BRIDGE_DESKTOP_TASKS=1, starts immediately",
      +  "minLength": 1,
      +  "type": "string"
      +}
  6. First observedv1.11.2

TDQS

A3.6/5.0
Behavior3/5

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

The description adds real operational context beyond the annotations: Desktop-mode task creation is atomic, prompt is required when CODEX_BRIDGE_DESKTOP_TASKS=1, and requestId must be reused on retries. However, annotations declare destructiveHint=true and openWorldHint=true, and the description never explains what side effects or persistence justify the destructive flag, so the safety profile stays opaque.

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?

Usage condition is front-loaded, then the Desktop-mode mechanics, then sibling routing — a sensible order. Sentences are dense but each carries distinct information; the requestId clause is slightly repetitive with the schema.

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 five-parameter creation tool with full schema coverage and no output schema, the description covers authorization, mode requirements, retry identity, and sibling routing. Remaining gaps are the unexplained destructive/edit side effects and the absence of any mention of what the call returns (e.g., the new threadId needed for follow-up).

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 100%, so all five parameters are already documented in the schema, including the requestId retry/dedup rules and the prompt formatting contract. The description restates the requestId retry discipline and prompt requirement without adding format or mode details the schema lacks, so it sits at baseline.

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 gives a specific verb+resource ('Start a new Codex task') and scopes it to 'a new conversation for independent work', which separates it from send_to_codex_thread (continue unfinished work) and delegate_to_codex (also waits for the reply). It never addresses the closely related sibling open_codex_thread, leaving an obvious ambiguity unresolved.

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?

It states the authorization condition for use ('explicitly or through standing instructions') and names two alternatives with the condition that selects each. It gives no negative guidance and does not explain when open_codex_thread would be preferred over this tool.

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