Compare

OpenCode vs Codex.

An open-source agent that takes any provider against OpenAI’s own agent. A ChatGPT plan signs in to both, so the choice is less about price than about which models you want and whose defaults you trust. Every figure below was read on 16 November 2026 from the page linked under Sources. Starkomand, which runs both, is ours; the comparison does not depend on it.

v1.0.8 · Mac and Windows · free for 3 days · no account

The short version.

  • Your ChatGPT planWorks in both. Codex is part of the plan; in OpenCode you connect OpenAI and choose Sign in with ChatGPT to use Plus or Pro instead of an API key.
  • ModelsOpenCode connects to more than 200 providers through Models.dev, local models included. Codex runs OpenAI’s GPT-6 models.
  • PriceOpenCode is free, MIT-licensed software that starts with free models; its own plans are Go at $10 a month and Go Plus at $40. Codex comes with ChatGPT: Free and Go ($8) for light tasks, Plus at $20.
  • BenchmarksCodex CLI with GPT-6 Astra has the top Terminal-Bench 2.1 run, 87.4%. The board lists no OpenCode run, and OpenCode’s result would depend on the model you connect.
  • InstructionsBoth read AGENTS.md, so one file of rules covers them.

Side by side.

OpenCode next to Codex CLI, from both vendors’ public pages on 16 November 2026.

Criterion OpenCodeOpen source, MIT Codex CLIOpenAI
Source Open source, MIT license OpenAI’s own agent
Where it runs The terminal, a desktop app for macOS, Windows and Linux, a mobile app and an SDK The terminal, IDEs, the desktop app, the web and iOS, plus cloud tasks
Models 200+ providers through Models.dev, including local models GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Sol and GPT-6 LunaEach model draws on the allowance at its own rate.
Sign in with a plan ChatGPT Plus or Pro, GitHub Copilot, or OpenCode Go ChatGPT Free, Go, Plus or Pro
Cheapest way in Free, with free models to startOther models cost what their provider charges. ChatGPT Free and Go ($8/month) for light tasks; Plus at $20/month
Its own subscription Go, $10/month; Go Plus, $40/monthGo also works in Codex, Claude Code and Pi. ChatGPT Plus $20, or Pro at $100, $200 or $500 a month
Terminal-Bench 2.1, best published run No published run 87.4% with GPT-6 Astra
Usage windows Five-hour allowances on Go; otherwise whatever your provider meters Five-hour windows on Plus; none on Pro at present; weekly limits may apply
Parallel work Several agents in parallel on one project Subagents, and cloud tasks on OpenAI’s machines
Project instructions AGENTS.mdFalls back to CLAUDE.md when there is no AGENTS.md. AGENTS.md

Same on both. MCP servers, skills, subagents and an AGENTS.md file of project rules.

Every figure on this page was read on 16 November 2026 from the page listed under Sources, and both products change monthly; product names belong to their owners. Spotted a change? Tell us.

Benchmarks.

Terminal-Bench measures agents completing real command-line tasks. Version 2.1 fixes 28 of the 89 tasks in 2.0, and no task in 2.1 is left unsolved.

Harness Model Score Run date
Codex CLI GPT-6 Astra 87.4% 3 Sep 2026
Codex CLI GPT-5.5 83.2% 23 Apr 2026
Codex CLI GPT-5.6 Terra 78.4% 26 Jun 2026
Terminus 2 GPT-5.5 78.0% 23 Apr 2026
Codex CLI GPT-5.6 Luna 75.7% 26 Jun 2026

Selected rows from the Terminal-Bench 2.1 leaderboard.

No OpenCode run
The board lists no OpenCode row, so there is no published number to set beside Codex’s.
The harness matters
GPT-5.5 scores 83.2% in Codex CLI and 78.0% in Terminus 2, the benchmark’s neutral harness. The same model in OpenCode could land on either side of that.

No benchmark measures your repository. The better test is one real task run in both: note the wall-clock time, what it drew from your allowance and whether the diff shipped. It is a sample of one, so repeat it after the next model release.

Prices.

OpenCode is free software with optional plans; Codex comes inside ChatGPT plans.

Plan Price What it includes
OpenCode $0 The agent, MIT-licensed, with free models to start
OpenCode Go $10/month Coding models such as Kimi K3.1 Pro and DeepSeek V4 Pro, with five-hour allowances; also works in Codex, Claude Code and Pi
OpenCode Go Plus $40/month Go’s models with four times the allowance
OpenCode Zen Per token Frontier and open-weight models at list price, through one key
ChatGPT Free $0 Quick coding tasks with GPT-6 Luna in the desktop app, subject to rollout
ChatGPT Go $8/month Lightweight coding tasks with GPT-6 Luna in the desktop app, subject to rollout
ChatGPT Plus $20/month Codex on the web, CLI, IDE and iOS; GPT-6.1 Sol and GPT-6 Luna, with per-model allowances
ChatGPT Pro $100, $200 or $500/month No five-hour limit at present; Ultrafast mode on the $500 plan

If you already pay for ChatGPT Plus, both agents are covered: Codex uses the plan directly, and OpenCode signs in with it. OpenCode Go is the extra $10 for models a ChatGPT plan does not include.

Which one.

Pick OpenCode if

you want open source, a choice of provider including local models, or one agent that can also run on a Copilot plan or OpenCode Go.

Pick Codex if

you want OpenAI’s defaults: an OS-enforced sandbox with network access off from the first run, cloud tasks, and the top published Terminal-Bench run.

Pick both if

you want a second model family beside GPT: Codex on your ChatGPT plan, OpenCode on Go or a local model, and one AGENTS.md for both.

MoreOpenCode in StarkomandCodex CLI in StarkomandCodex vs Claude CodeCursor vs Claude CodeOpenCode vs Claude CodeGitHub Copilot vs Claude CodeCodex vs CursorGemini CLI vs Claude CodeKiro vs Claude CodeAntigravity vs Claude CodeRun multiple Claude Code agents in parallelWhat is an ADE?Agent orchestrationcmux for Windowscmux vs tmux

Running both by hand.

Both read AGENTS.md, so one file of rules covers them. Install OpenCode and run each agent in its own terminal.

# OpenCode
curl -fsSL https://opencode.ai/v2/install | bash

# a worktree each when both write code
git worktree add ../app-opencode -b opencode-task

# then, in a terminal each
codex
cd ../app-opencode && opencode

Point OpenCode at a provider other than your ChatGPT plan when you want the two agents on separate allowances, and give each its own git worktree when both write code.

Running both in Starkomand.

Starkomand is ours, so this is the one section about it. It runs on Apple silicon Macs and on Windows 10 and 11, and needs no Starkomand account: OpenCode and Codex each run in a real terminal window on one canvas, signed in with your own plans or keys.

Plan in one, build in the other
Open Agent actions in a window, choose Hand off… and pick the other agent. The brief carries the objective and acceptance criteria, and the new window lands wired to the one that wrote it.
See both allowances
Settings → Usage meters puts a ring in the rail for OpenCode Go and one for your ChatGPT plan, each with its reset.
Read across windows
An agent can read another window’s transcript by name, so the plan does not need retyping.
Redirect by voice
Hold Option and speak to an agent by name.

We have not measured whether this makes anyone faster. What it changes is that each agent stays on its own plan, in view, and work moves between them without retyping.

Questions

Is OpenCode better than Codex?

There is no shared benchmark: Terminal-Bench 2.1 lists no OpenCode run, and OpenCode’s result depends on the model you connect. Codex CLI with GPT-6 Astra holds the top published run, 87.4%.

Can OpenCode use my ChatGPT subscription?

Yes. Connect OpenAI in OpenCode and choose Sign in with ChatGPT to use a Plus or Pro plan instead of an API key. Codex uses the same plan directly.

Is OpenCode free?

The software is free and MIT-licensed, and it starts with free models. Other models cost whatever their provider charges, or you can subscribe to OpenCode Go at $10 a month.

Which is cheaper, OpenCode or Codex?

OpenCode costs nothing by itself, and Codex has a free and an $8 way in for light tasks. For regular work, ChatGPT Plus at $20 a month covers both agents, since OpenCode can sign in with it.

Do OpenCode and Codex read the same instructions file?

Yes. Both read AGENTS.md in the project, and OpenCode falls back to CLAUDE.md when there is no AGENTS.md.

Can I run OpenCode and Codex on the same project?

Yes. Keep the rules in AGENTS.md and give each agent its own git worktree when both write code.

Try it against your own setup.

Every feature, every provider, free for 3 days. Your CLIs are already installed; the canvas takes a minute.

v1.0.8 · Mac and Windows · no account