Skip to main content
Glama

Continue a Codex session

codex_follow_up

Sends a follow-up instruction to a previous delegation by thread_id, reusing retained context so only the new prompt is needed.

Instructions

Send a follow-up message to a previous delegation using its thread_id. Codex retains the earlier context, so only the new instruction needs to be sent. Like a delegation, it is sent to OpenAI and spends the user's Codex usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoOverride the model for this turn. Defaults to the thread's last model from memory or, on a registry miss, Codex's session file; if neither has it, the configured default, else the call is refused.
promptYesThe follow-up instruction.
sandboxNoSandbox policy for this turn. Uses the configured default when omitted; read-only when unset.
thread_idYesThe thread_id reported by a previous codex_delegate call.
working_dirNoAbsolute directory to resume in. Defaults to the directory the thread last ran in.
auto_approveNoNot supported on follow-ups: true is refused and nothing runs.
output_schemaNoA JSON Schema object for this turn's final message, which then comes back as JSON in a delimited block. OpenAI's structured outputs apply: every object needs "additionalProperties": false and every property listed in "required". At most 64 KiB serialised.
timeout_secondsNo
reasoning_effortNoOverride the reasoning effort for this turn. Defaults to the thread's last effort when the model is unchanged, otherwise to the configured or model default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • addedInput schema / properties / output_schema
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "A JSON Schema object for this turn's final message, which then comes back as JSON in a delimited block. OpenAI's structured outputs apply: every object needs \"additionalProperties\": false and every property listed in \"required\". At most 64 KiB serialised.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv0.3.0
    • changedInput schema / properties / model / description
      Previous value: -"Override the model for this turn. Defaults to the model the thread last ran with on this server; for a thread this server has no record of, the configured default, else the call is refused."New value: +"Override the model for this turn. Defaults to the thread's last model from memory or, on a registry miss, Codex's session file; if neither has it, the configured default, else the call is refused."
    • changedInput schema / properties / sandbox / description
      Previous value: -"Sandbox policy for this turn. Defaults to read-only."New value: +"Sandbox policy for this turn. Uses the configured default when omitted; read-only when unset."
  3. Changed4 schema fields changedv0.2.0
    • addedInput schema / properties / auto_approve / description
      Added value: +"Not supported on follow-ups: true is refused and nothing runs."
    • changedInput schema / properties / model / description
      Previous value: -"Override the model for this turn."New value: +"Override the model for this turn. Defaults to the model the thread last ran with on this server; for a thread this server has no record of, the configured default, else the call is refused."
    • changedInput schema / properties / reasoning_effort / description
      Previous value: -"Override the reasoning effort for this turn."New value: +"Override the reasoning effort for this turn. Defaults to the thread's last effort when the model is unchanged, otherwise to the configured or model default."
    • addedInput schema / properties / working_dir / description
      Added value: +"Absolute directory to resume in. Defaults to the directory the thread last ran in."
  4. Changed1 schema field changed
    • addedInput schema / properties / thread_id / pattern
      Added value: +"^[A-Za-z0-9][A-Za-z0-9_-]{0,199}$"
  5. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true, so the description carries the rest: the call goes to OpenAI, spends the user's Codex usage, and the thread is stateful (earlier context is reused). That is meaningful disclosure beyond structured fields, though sync/async behavior is left unstated.

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?

Three short sentences, front-loaded with who/what/how, followed by the stateful-context point and then the cost warning. No filler.

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 9-parameter, stateful, externally-billed call with no output schema, the description covers the essentials: thread linkage, context reuse, and cost. It omits whether the call blocks or returns a job handle (relevant given codex_job_status/codex_job_result siblings), which is the main remaining gap.

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 89%, which already sets a baseline of 3, and the description genuinely adds prompt semantics: Codex retains earlier context, so only the new instruction needs to be sent. That is meaning beyond the schema's 'The follow-up instruction.'

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 (send a follow-up message) plus the exact resource and linking key (a previous delegation, via its thread_id). The phrase 'previous delegation' implicitly separates it from codex_delegate, which starts a new one, so an agent can route correctly without opening either schema.

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?

'Send a follow-up ... using its thread_id' implies the precondition (you must already hold a thread_id from codex_delegate), and the cost sentence signals weight. However, no alternative is named and no explicit when-not condition is given, so usage is inferred rather than stated.

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