OHarness vs OpenCode
Choose OpenCode if you want a mature, fully open source terminal agent with the widest set of subscription logins. Choose OHarness if switching models mid-session without converting history, or one engine behind terminal, browser and desktop, matters more.
OpenCode’s side checked against its own documentation on . Sources are listed below.
Esta página está escrita em inglês. Os termos que explica são os que se procuram em inglês, e um termo técnico traduzido é um termo diferente.
Side by side
| OHarness | OpenCode | |
|---|---|---|
| Form factor | Terminal UI, browser UI, desktop app (macOS) and a headless runner — one engine | Terminal UI, desktop app, IDE extension, opencode web and opencode serve |
| Licence and source | Free to use; npm packages MIT. Source repository not public yet | MIT, source public |
| Models | Anthropic, OpenAI and Gemini natively; any OpenAI-compatible endpoint; 30+ catalogued providers | Any provider with an API key, plus any OpenAI-compatible endpoint; its own OpenCode Zen gateway |
| Local models | Ollama, LM Studio and vLLM built in, no key | Ollama and LM Studio, configured by example |
| Switching mid-session | /model mid-session; history is vendor-neutral, nothing converted | /models picker; model per agent; ctrl+t cycles variants |
| MCP | Yes — stdio and Streamable HTTP, with OAuth for remote servers | Yes — stdio locally, HTTP/SSE remotely with automatic OAuth |
| Permissions | Five modes plus allow/ask/deny rules in user, project and local scopes; deny beats bypass | allow/ask/deny per tool with wildcards, last match wins; most tools default to allow |
| Sandbox | No OS sandbox — a policy gate on tool arguments. Use a container for confinement | No OS sandbox; external_directory rules gate access outside the project |
| Subagents | Yes — isolated contexts, run in parallel | Yes — General, Explore and Scout built in, @mention to call |
| Headless | oharness-headless, JSONL on stdout | opencode run --format json; HTTP server; GitHub Actions installer |
| Price | Free with your own key or a local model; optional hosted plan | Free with your own keys; sign in with Claude, ChatGPT or Copilot plans; Zen pay-as-you-go |
Where OpenCode is stronger
- The source is public under MIT today; OHarness's is not yet.
- Signs in with ChatGPT, GitHub Copilot and (per its docs, with caveats) Claude subscriptions.
- A larger community and a fast release cadence.
- An installer that sets up a GitHub Actions workflow for you.
Where OHarness is stronger
- Conversation history is stored vendor-neutral, so a mid-session model switch converts nothing.
- Ask-before-change is the default mode; OpenCode defaults most tools to allow.
denyrules hold even in bypass mode, and rules stack across user, project and local scopes.- Terminal, browser and desktop run the same engine and the same sessions.
Which to choose
OpenCode, if you want an open source codebase you can read and fork today, or you pay for ChatGPT or Copilot and want the agent to use that plan.
OHarness, if you move between vendors and local models inside one task, or you want a conservative permission default with deny rules that nothing overrides.
Common questions
Is OHarness a fork of OpenCode?
No. OHarness is an independent harness with its own engine, MCP client and vendor-neutral history store. It uses the models.dev database for model metadata, which OpenCode also uses.
Which is better for local models, OHarness or OpenCode?
Both run Ollama and LM Studio. OHarness ships them as built-in providers that need no configuration and discovers their model lists automatically; OpenCode configures them in its provider config.
Are OHarness and OpenCode both free?
Both are free to use with your own keys. OpenCode is MIT licensed with public source; OHarness is free to use, its npm packages are MIT licensed, and its source repository is not public yet.
Sources
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.