A week with OpenCode: does provider-agnostic beat the flagship?
Two weeks ago I did the thing I keep telling juniors not to do: I swapped a tool I trust for a shiny one, mid-sprint, on a client Drupal 10 build. The tool was OpenCode, the terminal coding agent from the SST crew that has been quietly eating Claude Code's lunch on GitHub. Here are the field notes.
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, 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
A week 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 our custom modules, services.yml wiring and config schema without complaint. On 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 undo/redo I actually used. If you already pay Anthropic, here is the catch. OAuth appears blocked, so you feed it a raw API key and get billed separately from your Pro subscription. You pay twice for the same model.
Provider-agnosticism is real, but it is freedom to choose a worse experience as much as a better one.
Does provider-agnosticism buy anything?
So does model freedom buy a Drupal dev anything? I ran the same three tickets across a spread of models to find out.
- Flagship (Sonnet): a genuine peer to Claude Code, no meaningful gap.
- Mid-tier hosted models: it drifts on multi-file context and needs more steering.
- 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 the fortnight: if your daily driver is a frontier model, OpenCode is a legitimately nicer wrapper around it, and escaping a single vendor is worth something. But the promise that provider-agnosticism frees you from the flagship is, for real Drupal work, mostly aspirational. The moment you step off Sonnet or GPT to save money, the agent gets noticeably dumber about the framework glue that makes Drupal Drupal. Freedom, yes. A free lunch, no.