Codex Integration
March 9, 2026 ยท View on GitHub
Sibyl uses OpenAI's Codex CLI (GPT-5.4) as an independent third-party reviewer, providing a different AI perspective alongside Claude.
When Codex Is Used
| Pipeline Stage | Usage |
|---|---|
idea_debate | Independent review of generated ideas |
result_debate | Independent analysis of experiment results |
review | Parallel review alongside Critic and Supervisor |
writing_sections | Optional: entire paper written by GPT-5.4 (when writing_mode: codex) |
Setup
1. Install Codex CLI
npm install -g @openai/codex
2. Configure ~/.codex/config.toml
model = "gpt-5.4"
model_reasoning_effort = "high"
3. Set API Key
export OPENAI_API_KEY="your-openai-api-key"
4. Register MCP Server
Preferred:
claude mcp add --scope local codex -e OPENAI_API_KEY=your-key-here -- codex mcp-server
Manual JSON fallback:
{
"mcpServers": {
"codex": {
"command": "codex",
"args": ["mcp-server"],
"env": {
"OPENAI_API_KEY": "your-key-here"
}
}
}
}
5. Enable in Config
codex_enabled: true # Default: false (opt-in after Codex MCP is configured)
For your own local machine, once Codex MCP and OPENAI_API_KEY are working, it is recommended to enable codex_enabled: true in your local config.yaml. That file lives in your working tree, but Git does not track or commit it, so your machine can default to Codex without changing the repo-wide default.
How It Works
- Sibyl calls
mcp__codex__codexwith a review prompt - Codex CLI routes to GPT-5.4 (configured in
config.toml) - The review is written to the workspace alongside Claude's review
- The Synthesizer agent integrates both perspectives
Important: MCP calls do NOT pass a model parameter โ the model configured in ~/.codex/config.toml is used. This is because ChatGPT accounts may not support API-level model override.
The approval-policy should be set to "never" for fully autonomous operation.
Disabling Codex
codex_enabled: false
When disabled:
- Idea debate and result debate run without Codex review
- Review stage uses only Critic + Supervisor
- Writing cannot use
codexmode (falls back toparallel)
Server-Side Codex
When using experiment_mode: "server_codex", Codex CLI must also be installed on the GPU server:
# On GPU server
npm install -g @openai/codex
And set OPENAI_API_KEY in the server environment. Configure the path if non-standard:
server_codex_path: "/usr/local/bin/codex"