Skip to main content
Glama
antigravity-codex-mcp
by Sunlazys

codex_fork

Fork an existing Codex session by exact session_id or previous MCP job_id into a new session, enabling branching from a known state for parallel or modified tasks.

Instructions

Fork an existing Codex session by exact session_id or previous MCP job_id into a brand-new session.

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

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory (defaults to the source session's recorded cwd).
modelNo
imagesNo
job_idNoPrevious MCP job_id whose session to fork.
promptYesPrompt for the forked session via stdin.
profileNoOptional Codex config profile (-p).
sandboxNo
session_idNoExact source Codex session UUID to fork.
wait_secondsNo
output_schemaNo
allow_unindexedNo
max_duration_secNo
reasoning_effortNoOptional Codex reasoning effort override (-c model_reasoning_effort=..., e.g. low, medium, high, xhigh).
skip_git_repo_checkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and falls short: it does not say whether the source session is mutated, what is inherited (history, model, sandbox, cwd), what precedence applies when both session_id and job_id are supplied, or what happens on an invalid source ID. Only 'brand-new session' hints at independence between the fork and its source.

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 front-loaded sentence with no filler; the core action and source selectors come first. It is efficient, though its brevity is achieved partly by omitting information a 14-parameter tool needs.

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

Completeness3/5

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

For a tool with 14 parameters, no annotations, no output schema, and only 43% schema coverage, one sentence is thin. The essential routing information (what to fork) is present, but behavioral and parameter context for a complex session-creation tool is largely absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 43% across 14 parameters. The description only restates the two source-identification parameters that are already documented in the schema, and adds nothing about model, sandbox, images, wait_seconds, output_schema, allow_unindexed, max_duration_sec, or skip_git_repo_check. Critically, the session_id vs job_id precedence question is left unresolved.

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 gives a specific verb ('Fork'), a specific resource ('Codex session'), and names the two ways to identify the source ('exact session_id or previous MCP job_id'), plus the outcome ('brand-new session'). This implicitly distinguishes it from codex_resume, though it never names any sibling explicitly.

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 phrase 'into a brand-new session' implies the use case (branch from an existing session without continuing it), but there is no explicit when-to-use or when-not guidance, and no comparison to codex_resume or codex_run. The agent must infer the fork-vs-resume distinction from the wording alone.

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