OHarness vs OpenAI Codex CLI
Choose Codex CLI if you mostly use OpenAI models, want an OS-level sandbox with the network off by default, or want usage included in a ChatGPT plan. Choose OHarness if you want Anthropic, Gemini, DeepSeek and Chat Completions endpoints first-class in the same session.
Codex CLI’s side checked against its own documentation on . Sources are listed below.
本页正文为英文。它解释的术语是人们用英文检索的术语,而译过的术语已经是另一个术语。
Side by side
| OHarness | Codex CLI | |
|---|---|---|
| Form factor | Terminal UI, browser UI, desktop app (macOS) and a headless runner — one engine | CLI, IDE extensions, desktop app and Codex Web |
| Licence and source | Free to use; npm packages MIT. Source repository not public yet | Apache-2.0, source public |
| Models | Anthropic, OpenAI and Gemini natively; any OpenAI-compatible endpoint; 30+ catalogued providers | OpenAI models; Amazon Bedrock; custom providers must speak the Responses API |
| Local models | Ollama, LM Studio and vLLM built in, no key | --oss with Ollama or LM Studio |
| Switching mid-session | /model mid-session; history is vendor-neutral, nothing converted | /model changes model and reasoning effort |
| MCP | Yes — stdio and Streamable HTTP, with OAuth for remote servers | Yes — stdio and streamable HTTP |
| Permissions | Five modes plus allow/ask/deny rules in user, project and local scopes; deny beats bypass | Approval policies (on-request, never, granular) over sandbox modes |
| Sandbox | No OS sandbox — a policy gate on tool arguments. Use a container for confinement | OS-enforced: Seatbelt on macOS, bwrap + seccomp on Linux; network off by default |
| Subagents | Yes — isolated contexts, run in parallel | Yes — delegation to specialised agents |
| Headless | oharness-headless, JSONL on stdout | codex exec --json (JSONL); GitHub Action; SDK |
| Price | Free with your own key or a local model; optional hosted plan | Free CLI; included in ChatGPT plans; API key billed at API rates |
Where Codex CLI is stronger
- A real OS sandbox with network access off by default. OHarness has a policy gate, not confinement.
- Usage is included in ChatGPT plans, from Free upwards.
- Public source under Apache-2.0.
- Cloud tasks through Codex Web.
Where OHarness is stronger
- Anthropic and Gemini are native providers, not add-ons; DeepSeek, Kimi, GLM and 30+ others are catalogued.
- Any OpenAI-compatible Chat Completions endpoint works; Codex's custom providers must speak the Responses API.
- Switching vendor mid-session converts nothing.
- OHarness can use a ChatGPT plan too, through the
openai-codexprovider, alongside every other vendor.
Which to choose
Codex CLI, if your work is on OpenAI models, you want the strongest built-in isolation, or your ChatGPT plan should pay for it.
OHarness, if you want Claude, Gemini, GPT and cheap or local models in the same session, behind one set of permission rules.
Common questions
Can I use my ChatGPT subscription with OHarness?
Yes. The openai-codex provider reaches GPT models on a ChatGPT plan using the token from `codex login`. OHarness never refreshes that token itself, so it cannot sign the Codex CLI out.
Does Codex CLI work with Claude or Gemini?
Not natively. Codex CLI's custom providers must speak OpenAI's Responses API, so Anthropic and Gemini need a gateway that translates. OHarness speaks the Anthropic and Gemini APIs directly.
Which is safer, OHarness or Codex CLI?
Codex CLI enforces an OS-level sandbox with network off by default. OHarness enforces permission rules and writable roots on tool arguments, which guards against mistakes but does not confine a process; run it in a container when you need confinement.
Sources
- Codex README
- Codex config reference
- Codex approvals and security
- Codex non-interactive mode
- Codex pricing
Spotted something out of date? Tell us and it will be corrected. More comparisons are on the guides page, and Claude Code alternatives covers what to check before switching.