Skip to main content
Glama

Interrupt a Codex turn

interrupt_codex_turn
DestructiveIdempotent

Stop a running turn in a Codex thread by passing the thread ID and turn ID, ending execution when a prompt is no longer needed or must be halted.

Instructions

Stop a turn that is still running in a Codex thread.

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": {
      "threadId": "<threadId>",
      "turnId": "<turnId>"
    },
    "name": "interrupt_codex_turn"
  }
}

Input Schema

NameRequiredDescriptionDefault
turnIdYesTurn id reported by send_to_codex_thread
threadIdYesCodex thread id

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.23.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv1.11.2

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, and the description is consistent with them. It adds the useful state precondition (the turn must still be running) but does not disclose what happens to the interrupted turn's partial output, whether the thread remains usable, or what errors surface if the turn already completed.

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?

A single sentence with zero filler, and the key qualifier ('still running') is front-loaded. It is arguably under-sized for a destructive operation, but there is no wasted text to trim.

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

Completeness2/5

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

This is a destructive, open-world mutation with no output schema, and the description leaves the important consequences unexplained: what happens to in-flight output, whether the thread state is preserved, and what the caller receives on success or on an already-finished turn. An agent has to guess at the aftermath of the interrupt.

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 threadId and turnId are already documented, including the pointer that turnId comes from send_to_codex_thread. The description adds no further meaning about either parameter, so the baseline 3 applies.

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 states a specific verb ('Stop') and resource ('a turn that is still running in a Codex thread'), which is more precise than the title. It implicitly distinguishes itself from stop_codex_app_server by scoping to a single turn, but never names that sibling to make the distinction explicit.

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 'still running' precondition implies when the tool applies, but there is no explicit guidance on when to interrupt versus letting a turn finish, nor any pointer to stop_codex_app_server for the server-level alternative. Usage is inferable rather than stated.

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