At 16:22 UTC on Oct. 30, a GitHub user named aliaksandrsen left a question under a pull request that OpenCode had merged earlier that day. The new feature looked useful, the comment said, but could Anthropic ban an account for using it? Two minutes later the pull request's author, Tarquinen, a member of the OpenCode organization on GitHub, answered in one line: "We got permission from Anthropic and everything here is fully tos compliant."
The pull request, #58782, adds a model provider called Claude Agent to OpenCode, the open-source coding agent. The v2.2.3 release notes published the same day spell out the steps: install Claude Code, Anthropic's command-line coding tool, run claude auth login, then pick Claude Agent in OpenCode. In practice, that means Claude Pro, Max and Ultra subscriptions work in OpenCode again. Seven months ago, on March 19, a pull request from OpenCode's dax titled "anthropic legal requests" (#18186) had removed the project's built-in Anthropic login plugin "per legal requests."
The subscriptions didn't come back because Anthropic opened them to any third-party tool. They came back because OpenCode changed how it reaches Claude. It no longer holds the user's login and calls the model itself. It runs the copy of Claude Code the user already installed, and lets Claude Code send every request.
That design shows where the line now sits. A Claude subscription can follow a developer into someone else's tool, as long as Anthropic's own client makes the call. The outside tool can replace the interface, the tools and the permission prompts. The layer closest to the model stays with Anthropic.
For open-source coding agents, that is a workable template on rented ground. Whether it keeps working, and how it is billed, depends on a program they can't change and on help-center pages that can be rewritten at any time.
A shell around Claude Code
OpenCode's design spec for the provider is precise about the boundary. OpenCode starts the user's claude program through Anthropic's public Claude Agent SDK. It "never reads Claude Code's saved login," and it "never sits between Claude Code and Anthropic or changes Claude Code's requests." Whatever Claude Code is signed in with, whether a subscription, an API key or a cloud account, is what gets used.
To keep the experience OpenCode's own, the provider switches off Claude Code's built-in tools, its auto-compaction and auto-memory, and the user's ~/.claude settings, CLAUDE.md files, hooks and MCP servers. When Claude wants to read a file or run a command, it calls tools that OpenCode exposes to it over MCP. OpenCode runs them, shows its own permission prompts and hands back the result. The payoff is a history that doesn't care which model wrote it: a user can move from Claude to another model mid-session and pick up where they left off.
The spec also lists what this costs. Claude Code doesn't pass the tool-call ID to OpenCode's handler, so OpenCode grabs it with a hook just before the call and can hold only one at a time. Tools therefore run one after another, never in parallel. Each session keeps a long-running claude process that exits after five idle minutes and restarts whenever the system prompt, the tool list or the connection settings change. Chats use Claude Code's base prompt rather than OpenCode's built-in agent prompts, though custom agent prompts still apply. And the provider works only on the user's own machine. Hosted OpenCode and remote workspaces are out, because there is no signed-in claude there to run.
The pull request added 6,866 lines and removed 67, a large share of them tests and recordings of real sessions.
Where the rules live
Anthropic's rules are spread across several pages. The Claude Agent SDK overview says that "unless previously approved, Anthropic does not allow third party developers to offer claude.ai login or rate limits for their products, including agents built on the Claude Agent SDK," and points them to API keys instead. A help-center article carries a June 15 update saying Anthropic had "paused the previously-announced changes to Claude Agent SDK usage," and that "Claude Agent SDK, claude -p, and third-party app usage still draw from your subscription limits." According to the README of pi-claude-code, a Claude Code extension for the Pi coding agent, the change announced in May would have moved that usage to a separate credit billed at API rates.
OpenCode's position is that it has permission. On X, when someone asked dax whether the team had struck a deal with Anthropic, dax replied: "nah just through the claude code sdk." The two statements can both be true, since approval doesn't require a commercial deal. But in the public record, the scope and terms of that permission appear only in a one-line comment on a pull request. As of Oct. 31, OpenCode's own providers page still carried the older note: there are plugins that let people use Claude Pro/Max models in OpenCode, and "Anthropic explicitly prohibits this."
Two ways in, neither simple
OpenCode isn't alone. Developer Manoj Mahalingam published a long post on X comparing the source of OpenCode's provider and pi-claude-code. Both switch off Claude Code's tools and let the outer program run them. They split on what happens after Claude asks for a tool. OpenCode keeps the Claude Code session open and waiting for the result. Pi asks Claude Code for a single response, captures the raw reply in a local relay, and replays the whole conversation into a fresh process for the next step.
"Both integrations still require a local Claude Code install and route every call through it, so neither turns a subscription into a general-purpose API key," Mahalingam wrote. Mahalingam had expected both setups to be simple; instead, "both were complicated in their own ways that it begged the question - do you even want to do this?"
Pi's code also shows the billing risk. Its billing.ts matches error messages such as "third-party apps now draw from your extra usage," and a comment says Anthropic returns them when it classifies a request as third-party app usage. By default, Pi stops the agent loop once a turn has drawn on paid usage credits. Its README is blunt: if Anthropic changes how claude -p usage is billed, the extension "may cost more, stop drawing from your subscription, or stop working altogether."
Subscriptions as distribution
The same week, Anthropic and OpenAI both added to what their subscriptions buy. Anthropic renamed Max 20x to Ultra: $200 a month, 10 times Pro's weekly usage, and no five-hour limit for verified accounts. Max, Ultra and Team plans also include monthly API credits, $100 for Max and $200 for Ultra, which cover the Claude API and the Agent SDK but not interactive Claude Code. On Oct. 28, OpenAI's developer account announced that eligible ChatGPT Pro and Business subscribers "can claim up to $500 per month in API credits to build apps and agents."
On the same providers page, OpenCode lists the subscriptions that work with no extra setup, ChatGPT Plus, GitHub Copilot and GitLab Duo among them, under the line "Other companies support freedom of choice with developer tooling."
Subscriptions are becoming a distribution channel for coding agents. Developers have already paid the monthly fee, and whichever tool can tap that allowance removes one reason not to try it. Anthropic's answer is to let the allowance travel, but only in its own vehicle.
The other side
For users, the gain is real. People already paying for Pro, Max or Ultra can stay in OpenCode's interface and workflow and switch between models from different labs in one session without paying API rates on top. For Anthropic, every request still leaves through Claude Code, which handles its own retries, and its help center reserves the right to adjust usage limits to manage capacity.
Not everyone is won over. One developer who had cancelled their Max subscriptions wrote on X: "I don't see myself going back to Anthropic just because the subscription suddenly works in opencode." Another asked why Anthropic is "so stubbornly refusing to let anyone create their own agents that use Claude subscription," arguing that the Agent SDK is "overly complex because it's too generalized."
Next, ask the next lab
After getting that answer, aliaksandrsen asked whether OpenCode would build a similar provider for Google's Antigravity CLI. Tarquinen said it wasn't on the roadmap, "but yes if agy supports everything we need and google allows it we can add it."
Whether an open-source agent can plug in is a question of engineering. Whether it may is up to the lab.
