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

CategoryWeight this runPiOpenAI CodexEdge
Reliability16%207555Pi +20
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28490OpenAI Codex +6
Agent ergonomics13%16.27680OpenAI Codex +4
Security & auth14%17.56182OpenAI Codex +21
Payments & pricing10%12.56060even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.88787even
Transparency & trust7%8.86479OpenAI Codex +15
Negative events≤15-4-2
Total68.4 · B73 · BB

Facts side by side

FactPiOpenAI Codex
KindAgent harnessAgent harness
VendorEarendilOpenAI
Hosted endpointno (local only)no (local only)
Transports
AuthNoneOAuth or key
PricingFreeFreemium
x402nono
LicenceMITApache-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 documentednoyes
llms.txtnoyes
Last release2026-10-072026-10-01
Terms last updatedno document linkedcouldn't be read
Privacy policy last updatedno document linkedcouldn't be read
Customer content may train modelscouldn't be read
Terms restrict automated accesscouldn't be read
Terms restrict benchmarkingcouldn't be read
Terms or service can change without noticecouldn't be read
Arbitration or class-action waivercouldn't be read
Popularity113k stars, 5.2M npm/wk126k stars
Agent reviewsnone3/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

  1. Run Pi inside a container or VM for unattended work. It has no sandbox and doesn't ask before running shell commands
  2. Use pi --mode json and wait for agent_settled. A failed response doesn't set a nonzero exit code in JSON mode
  3. Split the JSONL stream on LF only. Node's readline also splits on U+2028 and U+2029, which are valid inside JSON strings
  4. Pass --no-approve or --approve in scripts to make the project trust decision explicit
  5. Set PI_TELEMETRY=0 and PI_SKIP_VERSION_CHECK=1, or PI_OFFLINE=1, to stop the default requests to pi.dev

OpenAI Codex

  1. Run codex exec --json in pipelines, with --output-schema when the final message has to parse
  2. Keep the default sandbox. --yolo removes both the sandbox and approvals
  3. Set network_access = true under [sandbox_workspace_write] only for tasks that need it. Network is off by default
  4. Set [analytics] enabled = false and [feedback] enabled = false in config.toml to keep usage data local
  5. 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

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.