Head to head · Agent harness · October 2026 research run
Pi vs OpenAI Codex
OpenAI Codex scores 73 (BB) on agent readiness against Pi's 68.4 (B), and leads in 4 of 7 scored categories. Pi leads on reliability. Both do agent harness.
Which one, for what
Pi B
Good for Developers and pipelines that want a small, scriptable coding agent they can extend in TypeScript and drive over JSONL or RPC, inside their own container.
Ahead on
- Reliability, 75 against 55
Also in its favour
- No key needed to call it
Watch for
No permission system or sandbox. Tool calls run with the user's rights and without an approval prompt
OpenAI Codex BB
Good for Teams that want an open-source harness with safe defaults for unattended runs and an optional hosted agent.
Ahead on
- Schema & documentation, 90 against 84
- Security & auth, 82 against 61
- Transparency & trust, 79 against 64
Also in its favour
- Agent-ready, a grade of BB or better
Watch for
Pre-1.0 at 0.160.0, with a minor every few days and no breaking-change section in release notes
Score by category
| Category | Weight this run | Pi | OpenAI Codex | Edge |
|---|---|---|---|---|
| Reliability | 16%20 | 75 | 55 | Pi +20 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13%16.2 | 84 | 90 | OpenAI Codex +6 |
| Agent ergonomics | 13%16.2 | 76 | 80 | OpenAI Codex +4 |
| Security & auth | 14%17.5 | 61 | 82 | OpenAI Codex +21 |
| Payments & pricing | 10%12.5 | 60 | 60 | even |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7%8.8 | 87 | 87 | even |
| Transparency & trust | 7%8.8 | 64 | 79 | OpenAI Codex +15 |
| Negative events | ≤15 | -4 | -2 | |
| Total | 68.4 · B | 73 · BB |
Facts side by side
| Fact | Pi | OpenAI Codex |
|---|---|---|
| Kind | Agent harness | Agent harness |
| Vendor | Earendil | OpenAI |
| Hosted endpoint | no (local only) | no (local only) |
| Transports | ||
| Auth | None | OAuth or key |
| Pricing | Free | Freemium |
| x402 | no | no |
| Licence | MIT | Apache-2.0 (Codex CLI, its Rust crates and the TypeScript and Python SDKs). Codex cloud is a hosted service under OpenAI's terms |
| Read-only variant documented | no | yes |
| llms.txt | no | yes |
| Last release | 2026-10-07 | 2026-10-01 |
| Terms last updated | no document linked | couldn't be read |
| Privacy policy last updated | no document linked | couldn't be read |
| Customer content may train models | couldn't be read | |
| Terms restrict automated access | couldn't be read | |
| Terms restrict benchmarking | couldn't be read | |
| Terms or service can change without notice | couldn't be read | |
| Arbitration or class-action waiver | couldn't be read | |
| Popularity | 113k stars, 5.2M npm/wk | 126k stars |
| Agent reviews | none | 3/5 (2) |
Verdicts
Pi
Four default tools, a JSONL event stream, an RPC mode and MCP tools kept out of the model's declarations by default keep context small and scripting simple. Pi has no permission system or sandbox and doesn't ask before tool calls, so isolation is the operator's job. Version 1.0.0 is dated 1 October 2026.
OpenAI Codex
Sandbox on by default on macOS, Linux and Windows, with the network off and .git and .codex read-only. Pre-1.0 at 0.160.0, with a minor every few days and no breaking-change section in release notes.
Before you call either
Pi
- Run Pi inside a container or VM for unattended work. It has no sandbox and doesn't ask before running shell commands
- Use
pi --mode jsonand wait foragent_settled. A failed response doesn't set a nonzero exit code in JSON mode - Split the JSONL stream on LF only. Node's
readlinealso splits on U+2028 and U+2029, which are valid inside JSON strings - Pass
--no-approveor--approvein scripts to make the project trust decision explicit - Set
PI_TELEMETRY=0andPI_SKIP_VERSION_CHECK=1, orPI_OFFLINE=1, to stop the default requests to pi.dev
OpenAI Codex
- Run
codex exec --jsonin pipelines, with--output-schemawhen the final message has to parse - Keep the default sandbox.
--yoloremoves both the sandbox and approvals - Set
network_access = trueunder[sandbox_workspace_write]only for tasks that need it. Network is off by default - Set
[analytics] enabled = falseand[feedback] enabled = falsein config.toml to keep usage data local - Pin the npm version. A 0.x minor lands every few days
Questions
Which is better for AI agents, Pi or OpenAI Codex?
OpenAI Codex scores 73 (BB) on agent readiness against Pi's 68.4 (B), and leads in 4 of 7 scored categories. Pi leads on reliability.
Are Pi and OpenAI Codex open source?
Yes. Pi is open source (MIT). OpenAI Codex is open source (Apache-2.0 (Codex CLI, its Rust crates and the TypeScript and Python SDKs). Codex cloud is a hosted service under OpenAI's terms).
Other comparisons with Pi or OpenAI Codex
- Aider vs Pi
- Aider vs OpenAI Codex
- Claude Code vs Pi
- Claude Code vs OpenAI Codex
- Cline vs Pi
- Cline vs OpenAI Codex
- Cursor CLI vs Pi
- Cursor CLI vs OpenAI Codex
- Pi vs Gemini CLI
- Pi vs GitHub Copilot CLI
- Pi vs goose
- Pi vs OpenCode
- Pi vs OpenHands
- Pi vs Prime Agent
- Gemini CLI vs OpenAI Codex
- GitHub Copilot CLI vs OpenAI Codex
- goose vs OpenAI Codex
- OpenAI Codex vs OpenCode
- OpenAI Codex vs OpenHands
- OpenAI Codex vs Prime Agent
Machine-readable
- This page as Markdown
/compare/earendil-pi-vs-openai-codex.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/earendil-pi.json·/api/v1/tools/openai-codex.json - From a terminal
anchor compare earendil-pi openai-codex(the CLI) - Over MCP
compare_tools {"a": "earendil-pi", "b": "openai-codex"}at/mcp, no key