Skip to main content
Glama

codex_fork_session

Fork an existing session by ID into a new independent session and execute a prompt, enabling branched coding tasks without altering the original.

Instructions

Fork an existing Codex session by ID into a brand new independent session and execute a prompt.

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

Input Schema

NameRequiredDescriptionDefault
modelNoOptional model override.
promptYesInstructions for the newly forked session.
session_idYesSession ID (UUID) to branch off.
working_dirNoWorkspace directory root for execution.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does disclose two important traits: the new session is independent (the original is presumably left intact) and a prompt is actually executed, implying model work and possible workspace side effects. It says nothing about whether the parent session is modified, whether working_dir defaults to the parent's, token/cost implications, or what is returned, which is a significant gap for an execution tool.

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?

A single front-loaded sentence with zero filler: verb, resource, resulting state, and the execution step. Nothing could be removed without losing meaning.

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 fork-plus-execute tool with no annotations and no output schema, the description covers the core action but leaves key questions unanswered: whether the forked session inherits the parent's conversation context, what the response contains (e.g. the new session ID), and whether the original session is untouched. Adequate but with clear gaps.

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. The description adds only that forking is by session ID and that prompt drives the new session; the model override and working_dir parameters are not mentioned, and no defaulting or inheritance behavior is explained.

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?

States a specific verb (fork) and resource (an existing Codex session by ID), plus the two effects: a brand-new independent session and prompt execution. An agent can tell this is not a plain read or resume. It stops short of naming codex_resume_session as the contrasting sibling, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance and no named alternative. The word 'independent' hints that this branches rather than continues a session (versus codex_resume_session), but that contrast is left for the agent to infer.

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