codex
Run a Codex session synchronously with configurable approval policy, sandbox, and optional isolated git worktree for conflict-free parallel execution.
Instructions
Run a Codex session synchronously. Parameters match the official Codex MCP tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The initial user prompt for the Codex session. | |
| approval-policy | No | Approval policy for shell commands generated by the model. | |
| sandbox | No | Sandbox mode. | |
| cwd | No | Working directory for the session. If relative, resolved against the server's cwd. | |
| worktree | No | Create an isolated git worktree and branch for this task. Each task gets its own copy of the repo so parallel tasks never conflict. The response includes the branch name (codex-swarm/<task_id>) -- merge it back when done. | |
| model | No | Optional override for the model name (e.g. 'gpt-5.4'). | |
| profile | No | Configuration profile from config.toml. | |
| config | No | Config settings that override server defaults. | |
| base-instructions | No | Instructions to use instead of the defaults. | |
| developer-instructions | No | Developer instructions injected as developer role message. | |
| compact-prompt | No | Prompt used when compacting the conversation. |