◆ Winter saleAll 3 kits for $29 instead of $49.See the offer →
← All posts

OpenCode vs Claude Code: what changed when we ported 30 commands

By Wajahat Karim · December 5, 2026 · 5 min read

OpenCode vs Claude Code: one command file rendered into two folders, .claude/commands and .opencode/commands, both running Gradle in the background with a poll, and a sticky note about a 47 minute frozen buildBuild a mobile app with AI. 0 to store review in 5 hours.$29 →

The first time I let Claude Code run a fresh Android build, the cursor blinked for 47 minutes. I blamed my internet in two family groups. It was the agent's shell timeout.

Short answer: OpenCode vs Claude Code comes down to models and money. OpenCode is open source, runs 200+ providers and has free models. Claude Code runs Claude models and needs a paid Claude plan. Both read Markdown slash commands and both stop a foreground shell call after two minutes by default. For a mobile app, both work. Pick on the model you trust.

That frozen build is why I think about long builds first, for every agent. NowKit has 30 /kit-* commands and ships them for 5 agents. Claude Code and OpenCode are two of them.

So I've seen the same command land in both. Here's what actually differs.

OpenCode vs Claude Code: what is the difference?

Claude Code is Anthropic's coding agent and runs Claude models. OpenCode is an open source agent that runs almost any model, from free ones to your own subscription. The daily work feels close: a terminal, a chat, tools that read, edit and run commands.

OpenCode vs Claude Code side by side, checked December 5, 2026: OpenCode has free models with no account and runs Claude through Claude Agent, Claude Code runs Claude models on a paid plan; instructions in AGENTS.md vs CLAUDE.md; commands in .opencode/commands vs .claude/commands; both have a 2 minute default foreground shell limit

OpenCodeClaude Code
ModelsFree models, 200+ providers, local modelsClaude models
Cost to start (Dec 2026)$0Claude Pro, $20 a month
Project instructionsAGENTS.md, falls back to CLAUDE.mdCLAUDE.md, reads AGENTS.md only without one
Custom commands.opencode/commands/*.md.claude/commands/*.md (now skills)
Foreground shell limit2 minutes by default2 minutes by default
Long jobsbackground on the shell toolrun_in_background on Bash

The table is short. The real differences show up inside a long command.

Is OpenCode free, and what does Claude Code cost?

OpenCode is free to install and comes with free models, no account needed. OpenCode Go, its own subscription, starts at $10 a month. Claude Code is included in every paid Claude plan; Pro is $20 a month billed monthly, Max $100, Ultra $200.

Those Claude prices are from Claude's pricing page, as of December 2026. Pro drops to $17 a month on the yearly plan. Chat and Claude Code draw from one usage pool, and for most accounts the limit resets on a rolling five-hour window.

What each one costs per month, December 2026: OpenCode free models $0, OpenCode Go $10, OpenCode Go Plus $40, Claude Pro $20 monthly, Claude Max $100, Claude Ultra $200

Here's the catch with "free". You still pick a model, and the one you trust for a long build may not be on the free list. Try the free ones on a small screen first.

Can OpenCode use Claude models?

Yes. OpenCode's Claude Agent provider uses your Claude plan through Claude Code itself. You install Claude Code, run claude auth login, then connect Claude Agent in OpenCode. The model list comes from Claude Code.

So the choice is less "OpenCode or Claude" than it looks. You can keep Claude as the brain and use OpenCode as the app around it. Or switch to another provider for cheap tasks.

Do Claude Code commands work in OpenCode?

Mostly, after a copy. OpenCode reads Markdown commands from .opencode/commands/, Claude Code from .claude/commands/. Both use $ARGUMENTS and a description at the top. What breaks is any line that names a tool only one agent has.

A command that says "use the AskUserQuestion tool" means nothing to an agent without that tool. OpenCode has its own question tool, called question. Claude Code has task lists that our OpenCode copies don't use.

So we stopped hand porting. One body per command, rendered into each agent's folder with its own tool names. If you're building with NowKit, every kit command already comes in both folders.

The instruction file works the same way. OpenCode reads AGENTS.md and falls back to CLAUDE.md. Claude Code reads AGENTS.md only when there's no CLAUDE.md. One file, symlinked, keeps both happy.

What happens to a long Gradle build in each one?

Both stop a foreground shell call after two minutes by default. A fresh Android build takes longer, so it has to run in the background and be checked. I learned that the hard way.

Claude Code's limit is the BASH_DEFAULT_TIMEOUT_MS setting, 2 minutes unless you change it. OpenCode's shell tool has the same two minute foreground default and a background option.

My first fresh build hit that limit in the middle of a download of about 1 GB. Claude Code killed Gradle. The killed build left lock files in ~/.gradle, and the rerun waited on them forever.

I stared at that blinking cursor for 47 minutes. I restarted my Wi-Fi router twice. Trust me, it was not the Wi-Fi.

The Gradle step in NowKit's OpenCode commands: start the build in the background with nohup, write the exit code to build.log, then check the last lines every 30 seconds until GRADLE_EXIT appears

So in our OpenCode copies, every build step starts Gradle with nohup, writes its exit code to a log, and checks the log every 30 seconds. The Claude Code copies run a plain ./gradlew, and Claude Code has run_in_background for long jobs. My Claude Code Android guide has the Claude side.

Which one should you use to build a mobile app?

Pick Claude Code if you already pay for Claude and want the smoothest start. Pick OpenCode if you want free models, other providers, or Claude and cheaper models in one app. The app you ship will be the same either way.

What I'd do:

  1. Already on Claude Pro or Max? Start with Claude Code. Nothing to set up.
  2. No budget yet? Install OpenCode and start with the free models.
  3. Want both? Run OpenCode with Claude Agent, and keep one AGENTS.md for the project.
  4. Whatever you pick, send long builds to the background.

I build NowKit with Claude Code every day. The same 30 commands still ship for Claude Code, Cursor, Codex, Antigravity and OpenCode, so your agent doesn't have to match mine.

So, pick one tonight, open your project and ship something small. And if your build freezes for more than two minutes, don't restart the router. I already did that for you.

Frequently asked questions

Is OpenCode better than Claude Code?

Not for everyone. OpenCode is open source and runs almost any model, including free ones. Claude Code runs Claude models on a paid Claude plan. If you already pay for Claude, Claude Code is the simpler start.

Is OpenCode free?

Yes, the app is open source and comes with a set of free models, no account needed. You pay only if you bring a paid provider or subscribe to OpenCode Go, which starts at $10 a month.

Can I use my Claude subscription in OpenCode?

Yes, through the Claude Agent provider. It runs Claude Code on your machine, so you install Claude Code and log in first. The model list comes from Claude Code.

Do Claude Code slash commands work in OpenCode?

Not from the same folder. OpenCode reads Markdown commands from .opencode/commands, Claude Code from .claude/commands. The file shape is close, so porting is mostly a copy, until a command depends on a tool only one agent has.

Does OpenCode read CLAUDE.md?

Yes, as a fallback. In any folder without an AGENTS.md, OpenCode reads CLAUDE.md instead. Claude Code works the other way and reads AGENTS.md only when there is no CLAUDE.md.

What about Codex?

Codex is the third big option. I keep it for its own comparison post. NowKit ships its commands for Codex too, where you type $kit- instead of /kit-.

Claude Code and AI agents

Related guides