Open Source AI Coding Agent OpenCode Hits 172k Stars as Copilot Bills by Token

GitHub Copilot switched to token-based billing on June 1, and developers noticed immediately. Here's what the Copilot billing change means for teams, and why OpenCode is the tool they're reaching for.

Cover art for Open Source AI Coding Agent OpenCode Hits 172k Stars as Copilot Bills by Token

A developer on Copilot Pro Monthly reported that on June 1 - the day GitHub switched to usage-based billing - two prompts exhausted his entire month's credits. He posted about it in the GitHub Community forum and was far from alone.

GitHub announced that all Copilot plans would transition to usage-based billing on June 1, 2026, replacing the old request-counting model with a monthly allotment of AI Credits, with the option to purchase more. On the surface that sounds neutral. In practice, the cost of an interaction now depends on two things: the model and the number of tokens consumed. A flat prompt to a lightweight model might cost a fraction of a cent. A long agent session using a frontier model across multiple files will cost considerably more, because agentic features can involve multiple model calls within a single task.

The community reaction was fast and loud. Users who found themselves charged based on tokens burned rather than a flat request rate took to Reddit and X to describe what in many cases appeared to be a drastic escalation in cost.

The trap: monthly Pro+ users who were comfortably finishing their premium-request budget every month assumed the credits model would work identically. It might. It also might burn through credits 50% faster if they lean on a more expensive frontier model than what GitHub was costing against in the old scheme.

Why the Copilot Billing Change Hits Agent Users Hardest

The billing change matters because Copilot is no longer just an autocomplete tool. In 2026, teams use it for full conversations, PR reviews, agent mode, terminal tasks, and long-running cloud agent sessions. A system priced per-request made sense when the product was mostly inline suggestions. It doesn't hold when one agentic task can make a dozen model calls without the developer lifting a finger.

Most teams are not going to pay more in absolute terms. The subset that leans on agent mode and Pro+ models will pay noticeably more - and they are also the teams that don't know that yet. That's the uncomfortable part. The developers most invested in Copilot's most capable features are the ones whose bills are hardest to predict.

As of June 1, usage-based billing went live for all users, and Copilot code review began consuming GitHub Actions minutes in addition to AI Credits. Code review specifically moved to an agentic architecture that runs on Actions, so a PR review now has two meters running simultaneously.

What an Open Source AI Coding Agent Gets You Instead

The timing was useful for OpenCode. OpenCode leads open-source agents at 172,198 GitHub stars , and it reported 7.5 million monthly active developers in June 2026, outpacing Cursor's growth trajectory.

The core proposition is simple. OpenCode is a terminal-based AI coding agent built by the team behind SST, now Anomaly. It runs locally on your machine, connects to 75+ AI providers, and gives you full control over which models process your code. You bring your own API keys. The tool itself is free under MIT. The MIT license means you can inspect, modify, and self-host the entire system.

That model-agnostic design turns out to be the key differentiator right now. OpenCode's 75+ provider support reflects a bet that no single model will dominate coding permanently - and June 2026 confirmed this, with five new capable coding models entering the market simultaneously. Developers who locked into a single-provider tool in 2025 are now in a worse position than developers who stayed model-agnostic.

The practical workflow OpenCode enables: route quick questions and boilerplate to a fast, cheap model like GPT-4o mini or Haiku; route complex architectural reasoning to Claude Opus 4.7; run offline on a local model when you need air-gapped execution. Switch based on context and cost, not based on which IDE you happen to have open.

One genuinely useful technical detail: OpenCode uses Language Server Protocol diagnostics that feed back into the model mid-task, enabling self-correction before the agent even reports back. In DataCamp's head-to-head testing, OpenCode generated 21 more tests on average than Claude Code on the same underlying model. That thoroughness traces directly back to the LSP feedback loop - no other major AI coding agent does this.

The Trade-offs Worth Knowing Before You Switch

OpenCode is not a clean win over every alternative. A few things are worth knowing before you move a team onto it.

OpenCode is 78% slower than Claude Code on the same underlying model. That's a real number from real benchmarks. Anthropic has spent significant engineering effort on latency; OpenCode's defaults prioritize thoroughness over speed.

The Hacker News community flagged that prompts are sent to OpenCode's cloud to generate session titles - even when running fully local models. That's a legitimate privacy concern that partially undercuts the air-gapped pitch. Track GitHub issue #16117 if that matters to your team.

After Anthropic's enforcement action in January 2026, OpenCode removed Claude Pro and Max OAuth login. Claude still works via a raw API key, and OpenAI now partners with the project. So you can't route a Claude Pro subscription through OpenCode the way you might want to - you'll pay direct API rates for Claude usage.

Most developers settle on two or three agents. A common stack: Codex or Claude Code for heavy agent work, Copilot or Cursor for inline completions, and one free open-source agent for model flexibility. The agents are increasingly interoperable through MCP, so the model layer underneath them is where most of the cost and quality actually lives.

What Teams Should Actually Do Right Now

The Copilot billing change has a straightforward decision forcing function: figure out what you're actually spending on, then decide whether you want that spend to stay predictable or optimized.

If your team uses Copilot mostly for inline completions and occasional chat, the credits model will probably cost about the same as before. Code completions and Next Edit Suggestions are not billed in AI credits and remain unlimited for all paid plans. You're fine.

If your team runs agent mode regularly - delegating tasks, doing automated PR reviews, running long refactor sessions - you need to check your credit burn rate now. Admins can set user-level budgets for organizations and enterprises, including a universal budget for users with the option to override for specific sets of users. Set those budgets before you discover the overage.

For teams that want to keep costs predictable, a model-agnostic open source agent running on cheaper models for routine work is a reasonable hedge. A teammate like Beagle already lives inside Slack and Teams, so it can surface the same kind of context - docs, decisions, ticket status - without adding another tool your engineers have to context-switch into. But for the code-writing loop itself, OpenCode plus a mix of API providers is a viable combination: pay frontier prices only when the task warrants it.

The underlying dynamic is not going away. Every AI coding tool is moving toward usage-based pricing because flat subscriptions made no economic sense once agents started doing genuine multi-step work. The question isn't whether you want to think about token costs. It's whether you build that thinking into your workflow now or wait for a surprise bill to do it for you.

Keep reading