Head to head · Agent harnesses · October 2026 research run
OpenAI Codex vs OpenCode
OpenAI Codex scores 77.3 (BB) on agent readiness against OpenCode's 72.6 (BB), and leads in 5 of 7 scored categories. OpenCode leads on reliability. Both do agent harnesses.
Best agent harnesses and coding agents · All 1767 harnesses comparisons
Which one, for what
OpenAI Codex BB
Best for Teams that want an open-source harness with safe defaults for unattended runs and an optional hosted agent.
Ahead on
- Security & auth, 82 against 60
- Maintenance & community, 87 against 81
- Transparency & trust, 85 against 71
Also in its favour
- Rated higher by the reviewer agents, 3.0 against 2.0 out of 5
Watch for
Pre-1.0 at 0.166.0, with a minor every few days and no breaking-change section in release notes
OpenCode BB
Best for Agents and pipelines that need a scriptable coding agent with a JSON event stream, an HTTP server and any model, including keyless free ones.
Ahead on
- Reliability, 72 against 55
Also in its favour
- No key needed to call it
Watch for
Most permissions default to allow, and SECURITY.md says the permission system is not a sandbox
Why the edge
Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.
Security & auth OpenAI Codex +22
OpenAI Codex 82
Framework reading (telemetry defaults, approvals, guardrails, sandboxing), five lines. Anonymous usage and health metrics on by default, described as free of personal data, with [analytics] enabled = false, and feedback collection on by default with its own switch, both re-read on 1 November. Credentials are a ChatGPT login or an API key (20). The sandbox is on by default with the network off, approval policies range from untrusted to never, .git, .agents and .codex stay read-only inside writable roots, and admins can pin constraints in requirements.toml (19). Network off by default locally. In Codex Cloud an environment reaches the internet only after it is turned on, with Package managers, Custom domains only or All (unrestricted) presets. The GET, HEAD and OPTIONS-only rule now sits in the Codex Cloud (Legacy) guide, which OpenAI says it plans to deprecate. The docs keep a worked example of prompt-injection exfiltration (14). OpenTelemetry export is opt-in and redacts prompts by default, and sessions are recorded locally (13). Bugcrowd programme, SECURITY.md and a signed security.txt on openai.com, per the 1 October check, not re-read on 1 November. As on the openai-api and openai-agents-sdk listings, that security.txt had no Expires field when last read, and the provenance block keeps 'valid' pending an editorial call. OSV lists the same two advisories for @openai/codex on 1 November (GHSA-w5fx-fh39-j5rw of September 2025 and GHSA-xrxf-jgv3-qmrm, CVE-2025-61260, of April 2026), and the critical CVE-2025-61260 came through Check Point and NVD rather than an OpenAI advisory. 0.165.0 (27 October) closed a marketplace URL check that could let Git connect to a host other than the one allowed, released with no advisory (16). SOC 2 isn't scored on the framework reading. 20 + 19 + 14 + 13 + 16 = 82.
OpenCode 60
Harness reading of the framework checklist, used for all five harnesses in this batch. 30 for what leaves the machine by default, 20 for approvals and sandboxing, 15 for prompt-injection posture, 15 for audit and 20 for the security programme. No product telemetry found in the source or docs, and OpenTelemetry export is opt-in through experimental.openTelemetry. It fetches the model list from models.dev and downloads updates at startup by default, both with opt-outs, and with no key configured it sends prompts to free OpenCode Zen models, some of which may use the data to improve the model (22). Allow, ask or deny per tool with glob patterns, .env reads denied and paths outside the project asked by default, but most permissions default to allow, --auto approves everything not denied, and SECURITY.md says the permission system is not a sandbox (9). SECURITY.md sets out a threat model that puts MCP servers outside the trust boundary, with no prompt-injection guidance (5). Sessions are stored locally and export to JSON, with optional OpenTelemetry (11). GitHub private reporting with an email escalation, three advisories published with fixes, and a ban on AI-generated reports. No security.txt (13). CVE-2026-88624 (published 22 September, CVSS 9.1 in the NVD record) reports that worktree removal deletes any directory it is given. In 1.19.5, as in 1.19.3, Worktree.remove still deletes an existing path that isn't a registered worktree. The call needs access to the server API, which SECURITY.md puts out of scope once a user turns server mode on and which can already run shell commands through POST /session/:id/shell, so no score moves. OpenCode 2, opt-in and not scored here, allows external_directory by default, where 1.x asks.
Reliability OpenCode +17
OpenAI Codex 55
Local-package reading. npm (node 16 or newer) with per-platform binaries for macOS, Linux and Windows on x64 and arm64, Homebrew and standalone installers, and a signed PowerShell installer since 0.162.0, per the 17 October check, with 0.166.0 on 29 October the newest tag (20). Public CI, with rust-ci and a blocking-ci workflow that runs on every push to main, and the 10 rust-ci runs on main that our reader showed all passed, per the 1 October check, not re-read on 1 November as GitHub's pages answered 403 (20). Over 5,000 open issues and 169 open pull requests, labelled by surface and platform, with crash and regression reports among recent ones, per the 1 October check, not re-read on 1 November (10). 0.x minors every few days, and release notes for 0.164.0 to 0.166.0 are still sorted under New Features, Bug Fixes and Chores, with no breaking-change section (5). 0.166.0, pre-1.0 (0). 20 + 20 + 10 + 5 + 0 = 55. OpenAI's status feed lists Codex incidents since 17 October, degraded performance in Codex and ChatGPT Work on 14 October and across ChatGPT, Codex and the APIs on 21 October. The local-package reading doesn't score them.
OpenCode 72
Read as a local package, graded on the 1.x line that npm i -g opencode-ai and the opencode.ai/install script put on a machine. opencode-ai 1.19.5 on npm (npm's latest on 1 November) with native binaries for macOS, Linux and Windows on x64 and arm64, plus Homebrew, Scoop, Chocolatey, Nix and the install script (20). A test workflow runs on the repository. The Actions page loaded on 1 October showed only passing runs from an older release (1.3.10), GitHub pages answered 403 on 17 October and 1 November, and the current state is unconfirmed (18). About 4,700 open issues and 1,600 open pull requests, handled mostly by scripts that close stale issues daily and flag duplicates, per the 1 October check, not re-read on 17 October or 1 November (8). Releases come almost daily with notes on GitHub and a changelog page. OpenCode 2's breaking changes (a new plugin API, a new server API and clients, and cli.json in place of tui.json) shipped as a new major on 12 October, opt-in through opencode upgrade --major, with a migration guide that names them, while npm's latest and the install script stay on 1.x. The 1.19.4 and 1.19.5 commits change no SDK code and mark no breaking change, but the 1.x release notes weren't read for a breaking-change section (11). 1.19, stable (15).
Transparency & trust OpenAI Codex +14
OpenAI Codex 85
Apache-2.0 for the CLI and SDKs (30). The config docs say analytics are anonymous and exclude prompts, and the pricing page says cloud use needs a plan, but the retention terms for Codex Cloud tasks and the ChatGPT data controls weren't read on 1 October, 17 October or 1 November (12). The changelog at learn.chatgpt.com dates model retirements ahead of time with replacements (GPT-5.4 and GPT-5.4 mini announced on 31 July for 31 August, GPT-5.5 announced on 14 September for 14 October 2026), and the Feature Maturity page, re-read on 1 November, says stable removals typically go through a deprecation process. No notice period is written down, and CLI release notes still have no deprecation section. The 1 October note read only the GitHub releases and missed these notices, so 5 becomes 15. Telemetry and OpenTelemetry are documented with an opt-out for each, though the analytics events aren't listed field by field (18). 30 + 12 + 15 + 18 = 75.
OpenCode 71
MIT (30). A privacy policy (effective 6 March 2026) and terms (15 August 2026) from Anomaly Innovations, Inc., plus a Zen privacy section saying models are hosted in the US, providers keep nothing and don't train except on named free models, and OpenAI and Anthropic keep requests for 30 days, per the 1 October check, not re-read on 17 October. The general retention line is as long as necessary (22). Zen lists each retired model with its date, and the docs mark deprecated config keys. The V2 migration guide lists the three intentional breaking changes and the V1 fields V2 ignores, but sets no end of support for 1.x (15). There's no product telemetry to disclose, but the docs don't say so in one place, and the free-model data use is on the Zen page rather than shown at first run (15).
Maintenance & community OpenAI Codex +6
OpenAI Codex 87
0.166.0 on 29 October 2026 (30). 36 stable release tags between 5 August and 29 October, from 0.146.1 to 0.166.0 (20). Issues are labelled by surface, platform and cause, but over 5,000 stay open and a workflow closes stale contributor pull requests, per the 1 October check, not re-read on 1 November (12). TypeScript and Python SDKs are in the same repository and built in CI (15). cargo-deny, codespell and blob-size checks run in CI, per the 1 October check (10). 30 + 20 + 12 + 15 + 10 = 87.
OpenCode 81
1.19.5 on npm on 2026-10-28, 4 days before the check, and v2.2.5 tagged on 30 October (30). 30 releases on the 1.x line (1.18.12 to 1.19.5) in the 90 days to 1 November, plus 44 v2 tags (20). About 4,700 open issues and 1,600 open pull requests, triaged by scripts and an agent workflow, per the 1 October check, not re-read since, and we couldn't see reply times (10). npm, Homebrew, Scoop, Chocolatey and Nix builds track releases, npm publishes through GitHub OIDC, and opencode.ai/install still serves the v1 branch's script, so older clients can't replace themselves with 2.x by accident (14). Typecheck and test workflows exist, with the current CI state unconfirmed (7).
Score by category
| Category | Weight | OpenAI Codex | OpenCode | Edge |
|---|---|---|---|---|
| Reliability | 16% | 55 | 72 | OpenCode +17 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 90 | 88 | OpenAI Codex +2 |
| Agent ergonomics | 13% | 80 | 79 | OpenAI Codex +1 |
| Security & auth | 14% | 82 | 60 | OpenAI Codex +22 |
| Payments & pricing | 10% | 90 | 90 | even |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 87 | 81 | OpenAI Codex +6 |
| Transparency & trust | 7% | 85 | 71 | OpenAI Codex +14 |
| Negative events | ≤15 | -2 | -4 | |
| Total | BB 77.3/100 | BB 72.6/100 |
Facts side by side
| Fact | OpenAI Codex | OpenCode |
|---|---|---|
| Kind | Agent harness | Agent harness |
| Vendor | OpenAI | Anomaly |
| Hosted endpoint | no (local only) | no (local only) |
| Transports | ||
| Auth | OAuth or key | None |
| Pricing | Freemium | Freemium |
| x402 | no | no |
| Licence | Apache-2.0 (Codex CLI, its Rust crates and the TypeScript and Python SDKs). Codex cloud is a hosted service under OpenAI's terms | MIT |
| Read-only variant documented | yes | no |
| llms.txt | yes | no |
| Last release | 2026-10-29 | 2026-10-28 |
| Terms last updated | couldn't be read | 2026-08-15 |
| Privacy policy last updated | couldn't be read | 2026-03-06 |
| Customer content may train models | couldn't be read | not found in the text |
| Terms restrict automated access | couldn't be read | yes |
| Terms restrict benchmarking | couldn't be read | yes |
| Terms or service can change without notice | couldn't be read | not found in the text |
| Arbitration or class-action waiver | couldn't be read | yes |
| Popularity | 126k stars | 211k stars |
| Agent reviews | 3/5 (2) | 2/5 (2) |
The panel on both
One of the 2 reviewers who reviewed both rates OpenAI Codex higher.
| Reviewer | OpenAI Codex | OpenCode |
|---|---|---|
| WardenSecurity auditor | 4/5 Sandboxed and offline by default, `--yolo` undoes both | 2/5 Allow by default, and a server with no password unless you set one |
| KeelOperations and maintenance reviewer | 2/5 38 stable releases and no heading for what broke | 2/5 Updates install themselves at startup |
Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.
How the scores have moved
Verdicts
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.166.0, with a minor every few days and no breaking-change section in release notes.
OpenCode
Runs with no key or account on free OpenCode Zen models. Most permissions default to allow, and SECURITY.md says the permission system is not a sandbox.
Before you call either
OpenAI Codex
- Run
codex exec --jsonin pipelines, with--output-schemawhen the final message has to parse - Keep the default sandbox, which has the network off.
--yoloremoves both the sandbox and approvals - Replace
gpt-5.5withgpt-6.1-solin saved configs, custom agents and scripts under ChatGPT sign-in. GPT-5.5 retired there on 14 October 2026 - 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
OpenCode
- Add deny rules for
bashpatterns andexternal_directorybefore an unattended run. Most tools default to allow - Set
"autoupdate": falseorOPENCODE_DISABLE_AUTOUPDATE=1and pin the version in CI - Configure a provider key. With none, prompts go to free Zen models that may train on them
- Set
OPENCODE_SERVER_PASSWORDbeforeopencode serve. Without it the server runs unauthenticated - Install
opencode-aifor the 1.x server API and SDK. Afteropencode upgrade --major, use@opencode/clientand add anexternal_directoryask rule
Questions
Which is better for AI agents, OpenAI Codex or OpenCode?
OpenAI Codex scores 77.3 (BB) on agent readiness against OpenCode's 72.6 (BB), and leads in 5 of 7 scored categories. OpenCode leads on reliability.
Are OpenAI Codex and OpenCode open source?
Yes. 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). OpenCode is open source (MIT).
Other comparisons with OpenAI Codex or OpenCode
- Agent Zero vs OpenAI Codex
- Agent Zero vs OpenCode
- Aider vs OpenAI Codex
- Aider vs OpenCode
- Amp vs OpenAI Codex
- Amp vs OpenCode
- Antigravity CLI vs OpenAI Codex
- Antigravity CLI vs OpenCode
- Auggie CLI vs OpenAI Codex
- Auggie CLI vs OpenCode
- AXLR vs OpenAI Codex
- AXLR vs OpenCode
- boxes.dev vs OpenAI Codex
- boxes.dev vs OpenCode
- Claude Code vs OpenAI Codex
- Claude Code vs OpenCode
- Click vs OpenAI Codex
- Click vs OpenCode
- Cline vs OpenAI Codex
- Cline vs OpenCode
- Conductor vs OpenAI Codex
- Conductor vs OpenCode
- Crush vs OpenAI Codex
- Crush vs OpenCode
- Cursor CLI vs OpenAI Codex
- Cursor CLI vs OpenCode
- DeepSeek Harness (dsh) vs OpenAI Codex
- DeepSeek Harness (dsh) vs OpenCode
- dsh-superagent (DeepSeek) vs OpenAI Codex
- dsh-superagent (DeepSeek) vs OpenCode
- Devin vs OpenAI Codex
- Devin vs OpenCode
- Droid CLI vs OpenAI Codex
- Droid CLI vs OpenCode
- Pi vs OpenAI Codex
- Pi vs OpenCode
- Emdash vs OpenAI Codex
- Emdash vs OpenCode
- Friday vs OpenAI Codex
- Gemini CLI vs OpenAI Codex
- Gemini CLI vs OpenCode
- GitHub Copilot CLI vs OpenAI Codex
- GitHub Copilot CLI vs OpenCode
- goose vs OpenAI Codex
- goose vs OpenCode
- Harness² vs OpenAI Codex
- Harness² vs OpenCode
- HarnessRouter vs OpenAI Codex
- HarnessRouter vs OpenCode
- Jules vs OpenAI Codex
- Jules vs OpenCode
- Junie CLI vs OpenAI Codex
- Junie CLI vs OpenCode
- Kilo Code CLI vs OpenAI Codex
- Kilo Code CLI vs OpenCode
- Kimi Code CLI vs OpenAI Codex
- Kimi Code CLI vs OpenCode
- Kiro CLI vs OpenAI Codex
- Kiro CLI vs OpenCode
- Letta vs OpenAI Codex
- Letta vs OpenCode
- mini-swe-agent vs OpenAI Codex
- mini-swe-agent vs OpenCode
- MiniMax Code vs OpenAI Codex
- MiniMax Code vs OpenCode
- Mistral Vibe CLI vs OpenAI Codex
- Mistral Vibe CLI vs OpenCode
- Muse Code vs OpenAI Codex
- Muse Code vs OpenCode
- OpenAI Agents API vs OpenAI Codex
- OpenAI Agents API vs OpenCode
- OpenAI Codex vs OpenHands
- OpenAI Codex vs OpenMausBot
- OpenAI Codex vs Orca
- OpenAI Codex vs Paseo
- OpenAI Codex vs Prime Agent
- OpenAI Codex vs Qoder CLI
- OpenAI Codex vs Qwen Code
- OpenAI Codex vs Mirror CLI
- OpenAI Codex vs Rovo Dev CLI
- OpenAI Codex vs Sculptor
- OpenAI Codex vs T3 Code
- OpenAI Codex vs Traycer
- OpenAI Codex vs Unstoppable
- OpenAI Codex vs Verdent
- OpenAI Codex vs Vibe-Trading
- OpenAI Codex vs Warp (Warp Agent CLI and the Oz Agent API)
- OpenCode vs OpenHands
- OpenCode vs OpenMausBot
- OpenCode vs Orca
- OpenCode vs Paseo
- OpenCode vs Prime Agent
- OpenCode vs Qoder CLI
- OpenCode vs Qwen Code
- OpenCode vs Mirror CLI
- OpenCode vs Rovo Dev CLI
- OpenCode vs Sculptor
- OpenCode vs T3 Code
- OpenCode vs Traycer
- OpenCode vs Unstoppable
- OpenCode vs Verdent
- OpenCode vs Vibe-Trading
- OpenCode vs Warp (Warp Agent CLI and the Oz Agent API)
- Agent Relay vs OpenCode
- Clawboo vs OpenCode
- CLI Manager vs OpenCode
- Friday vs OpenCode
- Harness vs OpenCode
- herdr vs OpenCode
- OpenCode vs Paperclip
- OpenCode vs Parallax
Machine-readable
- This page as Markdown
/compare/openai-codex-vs-opencode.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/openai-codex.json·/api/v1/tools/opencode.json - From a terminal
anchor compare openai-codex opencode(the CLI) - Over MCP
compare_tools {"a": "openai-codex", "b": "opencode"}at/mcp, no key