Skip to main content
Glama

Continue Codex session

codex_continue

Resume a prior Codex session for a workspace so you can send follow-up prompts and continue coding work with the same sandbox and model.

Instructions

Continue the Codex session: resumes the thread rooted at this workspace (codex exec resume), so pass the same workspace= as the ask (without it the sub-agent sees no repo). It resumes the session the last codex_ask there started, else the newest on-disk session for that directory. The session keeps its original sandbox and model. Autonomous agent: trusted prompts only.

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_continue"
  }
}

Input Schema

NameRequiredDescriptionDefault
watchNoIf true, open the live "watch" view streaming codex's steps as it works (same viewer as codex_ask). Default false.
effortNoOptional reasoning effort for this turn, as in codex_ask. Omit to use the level in your codex config.
promptYesFollow-up message for the existing session.
timeout_sNoMax seconds to wait for codex to complete. Default 180.
workspaceNoWorking root used by the prior session. Defaults to the server cwd.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.38.0
    • addedInput schema / properties / effort
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional reasoning effort for this turn, as in codex_ask. Omit to use\n    the level in your codex config."
      +}
  2. Addedv0.12.2

TDQS

A4.3/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false): it discloses the session-resolution order (last codex_ask there, else newest on-disk session) and that the session inherits its original sandbox and model. It does not say what happens when no session exists at all, which is the main remaining behavioral gap.

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-loads the action and the critical workspace caveat in the first sentence, then layers resolution logic and constraints. Slightly dense with a repeated 'resumes' clause and a backticked CLI reference that adds little, but nothing is padding.

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 stateful, mutation-capable tool wrapped around an autonomous agent, the definition covers session targeting, inherited sandbox/model, and a trust constraint, and an output schema already documents return values. The only real omission is failure behavior when the referenced session is missing or expired.

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 100%, so baseline is 3, but the description adds genuinely new meaning for `workspace`: it must match the original ask and 'without it the sub-agent sees no repo', which is a stronger warning than the schema's neutral 'Defaults to the server cwd'. It also frames `prompt` as a follow-up to an existing session rather than a fresh task.

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?

States a specific verb and resource ('Continue the Codex session: resumes the thread rooted at this workspace') and even names the underlying operation (`codex exec resume`). It implicitly distinguishes itself from the sibling starter tool by explaining that it resumes the session that 'the last codex_ask there started', so an agent can tell which of the two to pick.

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?

Gives clear situational context: use with the same workspace=<project dir> as the original ask, and the closing 'Autonomous agent: trusted prompts only' implicitly excludes untrusted input. It stops short of an explicit 'if no session exists, use codex_ask instead' exclusion, so a 4 rather than a 5.

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