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.

Questa pagina è scritta in inglese. I termini che spiega sono quelli che si cercano in inglese, e un termine tecnico tradotto è un termine diverso.

Side by side

OHarnessOpenCode
Form factorTerminal UI, browser UI, desktop app (macOS) and a headless runner — one engineTerminal UI, desktop app, IDE extension, opencode web and opencode serve
Licence and sourceFree to use; npm packages MIT. Source repository not public yetMIT, source public
ModelsAnthropic, OpenAI and Gemini natively; any OpenAI-compatible endpoint; 30+ catalogued providersAny provider with an API key, plus any OpenAI-compatible endpoint; its own OpenCode Zen gateway
Local modelsOllama, LM Studio and vLLM built in, no keyOllama 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
MCPYes — stdio and Streamable HTTP, with OAuth for remote serversYes — stdio locally, HTTP/SSE remotely with automatic OAuth
PermissionsFive modes plus allow/ask/deny rules in user, project and local scopes; deny beats bypassallow/ask/deny per tool with wildcards, last match wins; most tools default to allow
SandboxNo OS sandbox — a policy gate on tool arguments. Use a container for confinementNo OS sandbox; external_directory rules gate access outside the project
SubagentsYes — isolated contexts, run in parallelYes — General, Explore and Scout built in, @mention to call
Headlessoharness-headless, JSONL on stdoutopencode run --format json; HTTP server; GitHub Actions installer
PriceFree with your own key or a local model; optional hosted planFree 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.
  • deny rules 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.