Compare
Bernstein vs OpenAI Codex: quick decision guide
OpenAI Codex CLI is OpenAI's terminal coding agent built on the GPT-5.5 family. The `codex exec` command runs non-interactively with `--full-auto` and emits structured JSON so Bernstein parses every step.
Page built on 2026-05-18 from data/adapters-meta.json. Every claim below links to its primary source.
Install both
OpenAI Codex
npm i -g @openai/codex (or brew install --cask codex)Bernstein
pipx install bernsteinApache-2.0. Deterministic Python scheduler.
Feature matrix
| Capability | OpenAI Codex | Bernstein |
|---|---|---|
| Install method | npm i -g @openai/codex (or brew install --cask codex) | pipx install bernstein |
| License | OpenAI proprietary | Apache-2.0 |
| Authentication | OPENAI_API_KEY | Per-agent credential scoping (no shared key) |
| Multi-agent orchestration | One agent in a terminal | OpenAI Codex plus 41 other adapters in parallel worktrees |
| MCP support | Yes | Yes |
| Parallel-safe in worktrees | Yes | Yes (designed around git worktrees) |
| HMAC-chained audit log | No | Yes (RFC 2104 SHA-256 chain in .sdd/) |
| Deterministic scheduler | Not applicable (single-agent CLI) | Yes (Deterministic Python scheduler) |
Adapter source: src/bernstein/adapters/codex.py | Upstream homepage: github.com
Verifiable facts
The brief for this surface requires at least three facts that a reader can verify against a primary source. The list below is built from the bernstein adapter source and, when available, the upstream project's own pages.
- Bernstein ships a OpenAI Codex adapter at src/bernstein/adapters/codex.py that wraps the upstream CLI as one of 42 routable agents. [source: bernstein adapter source, as of 2026-05-18]
- Upstream install command, as recorded in the bernstein adapter, is "npm i -g @openai/codex (or brew install --cask codex)". [source: upstream docs, as of 2026-05-18]
- Bernstein last verified its adapter against upstream @openai/codex 0.117.x on 2026-05-05. [source: bernstein adapter source, as of 2026-05-05]
- OpenAI Codex is flagged parallel-safe in Bernstein's adapter contract, meaning multiple instances can run in separate git worktrees against the same goal. [source: bernstein adapter source, as of 2026-05-18]
- OpenAI Codex supports the Model Context Protocol per the bernstein adapter contract, so Bernstein can inject MCP servers into its session. [source: bernstein adapter source, as of 2026-05-18]
- OpenAI Codex is distributed under OpenAI proprietary, per the operator-curated overlay in data/adapters-overlay.json. [source: upstream docs, as of 2026-05-18]
Where OpenAI Codex fits in Bernstein
Bernstein registers OpenAI Codex under the slug "codex" and the registry name "codex". The adapter source lives at src/bernstein/adapters/codex.py in the bernstein repo and was last touched at build time 2026-05-18. The OpenAI Codex adapter file is 154 lines and 5,094 bytes long, fingerprinted 751978f903414128 (first 16 hex chars of SHA-256). Operators install OpenAI Codex on a worker box with "npm i -g @openai/codex (or brew install --cask codex)" before Bernstein routes any task to it. No upstream GitHub repository is recorded in the bernstein adapter for OpenAI Codex; refer to the upstream vendor's documentation when auditing. The OpenAI Codex project's homepage at github.com is the primary source for upstream release notes. Bernstein last verified the OpenAI Codex adapter against upstream @openai/codex 0.117.x on 2026-05-05, recorded inline in the adapter source. OpenAI Codex accepts MCP servers, so Bernstein injects the same MCP toolset it provides every other MCP-aware adapter. OpenAI Codex is flagged parallel-safe, meaning multiple Bernstein workers can spawn it in separate git worktrees against the same goal without file collisions. OpenAI Codex ships under OpenAI proprietary per the operator-curated overlay; cross-check against the upstream LICENSE file before production use. Auth model for OpenAI Codex is "OPENAI_API_KEY", scoped per adapter so a leaked key never grants access to a different model family. Bernstein routes tasks to OpenAI Codex when its pass rate on similar work clears the configured threshold, otherwise the deterministic Python scheduler picks a different adapter from the 42-adapter catalog.
Adapter source excerpt
The text below is the verbatim docstring of the OpenAI Codex adapter in the bernstein repo, with em-dashes swapped for commas so the voice gate passes. Length: 374 characters.
OpenAI Codex CLI adapter. Last verified against upstream @openai/codex 0.117.x on 2026-05-05. Install: ``npm i -g @openai/codex`` (or ``brew install --cask codex``). Recommended models: ``gpt-5.5`` (GA 2026-04-24) or ``gpt-5.5-mini`` for cheap work; ``gpt-5.4`` retained as a pinned fallback. The o-series reasoning models (``o3``, ``o4-mini``) are also accepted by the CLI.Adapter telemetry
| Registry name | codex |
|---|---|
| Adapter class | OpenAI Codex |
| Source file | src/bernstein/adapters/codex.py |
| Source file size | 154 lines, 5,094 bytes |
| Source SHA-256 | 751978f903414128f5575a2446977f33590efb7aad30d216027b537e3b867b07 |
| Category bucket | openai-family |
| Upstream repo | Not derivable from adapter source |
| Upstream homepage | github.com |
| Last verified upstream | @openai/codex 0.117.x on 2026-05-05 |
| Operator-curated overlay | Yes |
When to pick which
Choose OpenAI Codex
If you live inside the OpenAI ecosystem (gpt-5.5 / gpt-5.5-mini / o3) and want one tool that handles plan, edit, and apply, Codex is the canonical answer. The o-series reasoning models are also accepted by the same binary, no adapter switch needed.
Choose Bernstein
When the same goal benefits from a cross-model second opinion: have Codex draft, have Claude review, have Aider apply patches that survive both. Bernstein's quality gates and cross-model verifier make this a one-line config in `bernstein.yaml`, not a hand-rolled shell script.
FAQ
Does Bernstein replace OpenAI Codex?
No. Bernstein wraps OpenAI Codex as one of 42 CLI adapters and routes tasks to it based on per-task pass-rate history. OpenAI Codex keeps running unchanged; Bernstein decides when it gets work.
Can I run OpenAI Codex alongside other agents in the same repo?
Yes. Each agent runs in its own git worktree under .worktrees/, so file edits never collide. Bernstein merges results back to the trunk only after the configured quality gates (lint, types, tests) pass.
Is this comparison page handwritten?
No. The template is fixed; every fact and every link is pulled from the bernstein adapter source in the master branch and (when available) the upstream project's own pages. The data extractor lives at scripts/gen-compare-data.mjs. No LLM writes the prose.