Skip to main content
Glama

codex_steer

Steer an in-progress Codex session by sending a new or updated prompt: interrupt mode cancels obsolete work and resumes the same session, while queue mode adds a follow-up.

Instructions

Send a new or updated instruction to an in-progress or existing Codex session. Two modes:

  • "interrupt" (DEFAULT): Cancels the running Codex task (if active and session_id is known) and resumes the same session_id with the new prompt so Codex stops obsolete work right away.

  • "queue": Enqueues a follow-up independently via CLI arguments (subject to platform command-line length and process visibility limits) using saved session settings; rejects per-call model, reasoning_effort, and sandbox overrides. Use only when explicitly requested. Applies the best-effort reset-card prompt guard unless CODEX_DISABLE_RESET_CARD_GUARD=1 or true.

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": {
      "prompt": "<prompt>"
    },
    "name": "codex_steer"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory. Optional if task_id or a tracked session_id is provided; required for untracked sessions.
modeNoDefaults to "interrupt" (cancel active turn and resume immediately). Use "queue" only when explicitly requested.
modelNoOptional model override for interrupt mode.
imagesNoOptional image attachments for interrupt mode.
promptYesThe new, adjusted, or follow-up instruction for Codex.
sandboxNoOptional sandbox override for interrupt mode. Defaults to the tracked task's sandbox or preserves saved session permissions.
task_idNoTracked task_id to steer (auto-resolves session_id, cwd, model, effort, and sandbox).
worktreeNoOnly supported if interrupt starts a new session.
session_idNoOptional explicit Codex session_id (required if task_id is not provided).
queue_resumeNoOnly for mode='queue': passes --resume to `codex queue` to trigger daemon resume after queueing.
wait_secondsNoSeconds to wait synchronously in interrupt mode. Default: 300.
reasoning_effortNoOptional reasoning effort override for interrupt mode.
skip_git_repo_checkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does substantial work: it discloses that interrupt cancels the active turn, that queue is constrained by command-line length and process visibility limits, that queue rejects per-call overrides, and that a reset-card prompt guard is injected unless an env var disables it. It does not say what happens when no active task exists for interrupt, nor whether the call blocks or what it 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?

Front-loaded purpose followed by a tight mode list and a single caveat sentence; formatting makes the two branches scannable. A little redundancy exists between the queue bullet's "Use only when explicitly requested" and the same phrasing in the mode parameter, but nothing is padded.

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 13-parameter mutation tool with no annotations and no output schema, the description covers the consequential surface: default mode, cancellation semantics, queue restrictions, and the guard. Gaps remain around return behavior, blocking semantics of wait_seconds, and the task_id/session_id/cwd resolution rules, but those are partially handled by the schema descriptions.

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 92%, so the schema already documents most parameters and the baseline is 3. The description still adds real meaning beyond it by tying mode-conditional behavior to parameters, stating that queue mode rejects model, reasoning_effort, and sandbox overrides, which is a cross-parameter constraint the schema does not express.

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 opening sentence gives a specific verb and resource ("Send a new or updated instruction to an in-progress or existing Codex session") and the two-mode breakdown sharpens what the tool actually does. It does not explicitly name a sibling such as codex_run for starting a fresh session, so differentiation from the rest of the toolset is only implied by "in-progress or existing".

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?

Mode selection is well covered: interrupt is declared the default with a rationale ("Codex stops obsolete work right away"), and queue carries an explicit exclusion ("Use only when explicitly requested"). What is missing is guidance on when to prefer this over codex_run (new work) or codex_cancel (abandon without a new prompt).

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