Skip to main content
← All articles
ai

A week with OpenCode: does provider-agnostic beat the flagship?

A week with OpenCode: does provider-agnostic beat the flagship?

My AI-coding setup runs on a hierarchy. Claude Code is the daily driver, on a business monthly subscription; when I burn through its limits, I drop down to OpenCode. I did not arrive there gently — I got here because GitHub Copilot Business, which I used to point OpenCode at, moved to token-based usage pricing and my costs went vertical overnight. So consider this a field note on OpenCode as an escape hatch, written by someone who genuinely keeps it in his back pocket.

What OpenCode actually is

OpenCode is an open-source coding agent that lives in your terminal, MIT licensed. The interesting bit is the shape of it: a local server holds session state while a thin TUI client connects to it, so a session survives an SSH drop or a laptop sleep, which Claude Code still cannot do cleanly. It gets called "Go-based" everywhere, but the current repo appears to be mostly TypeScript with a Zig-backed in-house TUI framework called OpenTUI. Take that Go label with salt.

  • Model reach: claims 75+ providers via the Vercel AI SDK and the models.dev database.
  • Bring your own key: Anthropic, OpenAI, Google, DeepSeek, Groq, GitHub Copilot, or local models over Ollama.
  • Community: appears to have crossed ~180k stars, reportedly overtaking Claude Code despite launching later.
curl -fsSL https://opencode.ai/install | bash
# or: npm i -g opencode-ai@latest

cd ~/projects/my-drupal-site
opencode              # boots the server + TUI
# /init    writes an AGENTS.md from your codebase
# /connect paste an API key, or point at local Ollama:
opencode --model ollama/qwen2.5-coder:32b

How it fits my stack

OpenCode terminal coding agent social banner
OpenCode's own banner. The polish is real; the terminal experience is the best part.

Here is the actual pecking order I run day to day, and how it got that way:

  1. Claude Code (business sub) — primary. Predictable flat monthly cost and the best agentic behaviour on my Drupal work. This is where I live.
  2. OpenCode — when Claude taps out for the day. Point it at a frontier model and the diffs are the same quality, plus the sessions survive a reconnect. It is my overflow lane.
  3. GitHub Copilot — OpenCode's backup provider. This used to be my main setup: OpenCode driven by my company's Copilot Business license. Then Copilot went token-based and the bill went vertical, so it got demoted to the reserve tank.

That Copilot demotion is the whole reason provider-agnosticism stopped being an abstract virtue for me.

When your provider's economics change under you overnight, a tool that lets you swap the engine without changing your workflow isn't a nice-to-have — it's the exit.

On a real Drupal repo

Getting it onto the repo was painless. It writes an AGENTS.md the way Claude Code writes CLAUDE.md, and it read my custom modules, services.yml wiring and config schema without complaint. Pointed at Claude Sonnet, the experience is honestly a wash with Claude Code — same model, same quality diffs on a hook_form_alter and a gnarly Batch API refactor, plus a nicer terminal and an undo/redo I actually used. The catch is billing: OpenCode has no Anthropic OAuth, so it runs on a raw API key metered per token, separate from my Claude Code subscription. Fine for occasional overflow; painful as a daily driver — which is exactly the trap I'd already fallen into once with Copilot.

Does provider-agnosticism buy anything?

So does model freedom actually buy a Drupal dev anything beyond the escape hatch? I ran the same three tickets across a spread of models to find out.

  1. Flagship (Sonnet): a genuine peer to Claude Code, no meaningful gap.
  2. Mid-tier hosted models: it drifts on multi-file context and needs more steering.
  3. Local Ollama: degraded fast on anything multi-file. It lost track of a service's constructor injection, hallucinated a container method, and reformatted a config YAML into something Drupal refused to import.

For a one-file tweak a local 32B coder model was fine and free. For agentic work across a module it was slower and needed babysitting.

The caveats nobody screenshots

The git snapshotting it does for session history appears to assume a small repo; point it at a Drupal root with vendor and a fat files directory and it thrashes. Running two sessions against the same directory can silently diverge its SQLite store. The MCP ecosystem is younger than Claude Code's. None are dealbreakers, but they are the sort of thing you only meet in week two.

My verdict after living with it as a backup: OpenCode is a legitimately nicer wrapper around whatever model you feed it, and on a frontier model it matches my daily driver. But the promise that provider-agnosticism frees you from the flagship is, for real Drupal work, mostly aspirational — step off Sonnet or GPT to save money and the agent gets noticeably dumber about the framework glue that makes Drupal Drupal. For me that's exactly the right job for it: not the daily driver, but the overflow lane when Claude hits its limit, and the insurance policy for the next time a provider rewrites its pricing overnight. Freedom, yes. A free lunch, no.

Links

BM
Blue Moose
The moose behind Blue Moose. Full-stack PHP developer — Drupal by day, Symfony by night, tests always.