codex_fork
Fork an existing Codex session into a new session and optionally send a prompt to continue the conversation.
Instructions
Fork a previous Codex session (codex exec fork) into a new session and optionally send a prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the codex process. | |
| env | No | Additional environment variables for codex. | |
| model | No | Model the agent should use. May be forced by the server's model-override environment variable. | |
| prompt | No | Optional prompt to send after forking. | |
| ephemeral | No | Skip persisting session files to disk. Defaults to true. | |
| extraArgs | No | Additional raw codex CLI arguments appended to the command. | |
| sessionId | Yes | Conversation/session id (UUID) or thread name to fork. | |
| timeoutMs | No | Process timeout in milliseconds. | |
| ignoreRules | No | Do not load user or project execpolicy .rules files. | |
| outputSchema | No | Path to a JSON Schema file describing the expected final response shape. | |
| skipGitRepoCheck | No | Allow running outside a Git repository. Defaults to true. | |
| outputLastMessage | No | Path to a file where the final agent message should be written. | |
| dangerouslyBypassApprovalsAndSandbox | No | Skip all confirmation prompts and sandboxing. Only use in an already-isolated environment. |