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
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory (defaults to the source session's recorded cwd). | |
| model | No | ||
| images | No | ||
| job_id | No | Previous MCP job_id whose session to fork. | |
| prompt | Yes | Prompt for the forked session via stdin. | |
| profile | No | Optional Codex config profile (-p). | |
| sandbox | No | ||
| session_id | No | Exact source Codex session UUID to fork. | |
| wait_seconds | No | ||
| output_schema | No | ||
| allow_unindexed | No | ||
| max_duration_sec | No | ||
| reasoning_effort | No | Optional Codex reasoning effort override (-c model_reasoning_effort=..., e.g. low, medium, high, xhigh). | |
| skip_git_repo_check | No |