Skip to main content
Glama

Resume a Codex session

codex_resume
Destructive

Resume a previous Codex session with full history using session_id or last=true, so you can continue earlier work without re-explaining context.

Instructions

Continue a previous Codex session with its full history, either by session_id or with last=true for the most recent one. Use this instead of codex_exec to follow up on earlier work without re-explaining the context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the run. Must sit inside the server allowlist. Defaults to the first allowed root.
lastNoContinue the most recent recorded session. Mutually exclusive with "session_id".
modelNoModel slug, e.g. "gpt-5.5". Defaults to the Codex configuration.
configNoRaw Codex config overrides as key=value, TOML-parsed, e.g. 'model_reasoning_effort="high"'.
enableNoCodex feature flags to enable for this run.
imagesNoImage files to attach to the prompt. Each must be inside the allowlist.
promptNoMessage to send after resuming. Omit to just replay the session.
disableNoCodex feature flags to disable for this run.
sandboxNoSandbox for commands Codex runs. "read-only" forbids writes, "workspace-write" (default) allows writes inside the workspace, "danger-full-access" removes all limits and is refused unless the server was started with CODEX_MCP_ALLOW_DANGEROUS=1.
worktreeNoRun in a fresh managed git worktree instead of the working directory.
ephemeralNoDo not persist the session to disk. It cannot be resumed afterwards.
thread_idNoAlias for session_id, matching the thread_id returned by codex_exec.
session_idNoSession UUID or thread name to continue. Mutually exclusive with "last".
output_schemaNoPath to a JSON Schema file constraining the shape of the agent final response.
timeout_secondsNoHow long to wait inline before handing back a job_id and continuing in the background. 0 means return immediately. Defaults to the server setting (120s).
skip_git_repo_checkNoAllow running outside a git repository.
dangerously_bypass_approvals_and_sandboxNoRemove every approval and sandbox check. Refused unless CODEX_MCP_ALLOW_DANGEROUS=1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.4

TDQS

A4.4/5.0
Behavior4/5

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

The description adds meaningful behavioral context by noting the session includes 'full history' and that no re-explanation is needed, which characterizes stateful continuation beyond what annotations provide. Annotations already signal destructive and open-world behavior, so the tool's mutation risk is covered even though the description does not elaborate on side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two tight sentences with no filler. The core action and selection mechanism are front-loaded, and the alternative-tool guidance is condensed into the second sentence.

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?

Despite having 17 parameters and no output schema, the description plus the fully documented schema and annotations provide enough context for correct invocation. The main gap is that it does not describe the return/background-job behavior, but the schema and sibling tools like codex_job_status cover much of that workflow.

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%, so the baseline is 3 and the schema already documents all 17 parameters. The description reinforces the role of session_id and last=true, but it does not add semantic details beyond what the parameter descriptions already specify.

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 clearly names the verb 'Continue', the resource 'previous Codex session', and the two selection modes (session_id or last=true). It also explicitly differentiates itself from codex_exec, so an agent can quickly tell when to pick this tool.

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?

It says directly to 'use this instead of codex_exec to follow up on earlier work without re-explaining the context'. This gives a concrete condition for using the tool and names the relevant alternative, leaving little to inference.

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