[{"data":1,"prerenderedAt":1046},["ShallowReactive",2],{"blog-claude-in-opencode-en":3},{"slug":4,"published":5,"minutes":6,"category":7,"tags":8,"tagPages":14,"keywords":17,"about":28,"sources":37,"cover":74,"og":75,"expertise":76,"locales":77,"lang":78,"title":81,"description":82,"coverAlt":83,"metaTitle":84,"takeaways":85,"faq":91,"toc":107,"blocks":141,"others":808},"claude-in-opencode","2026-10-30",12,"agents",[9,10,11,12,13],"OpenCode","Claude Code","Claude Agent SDK","Coding agents","LLM pricing",[15,16],"claude-code","coding-agents",[18,19,20,21,22,23,24,25,26,27],"claude in opencode","opencode claude","opencode claude agent","opencode claude subscription","opencode claude max","opencode anthropic api key","claude agent sdk opencode","opencode claude code login","opencode github copilot claude","opencode zen claude pricing",[29,32,35],{"name":30,"url":31},"Claude (AI)","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FClaude_(AI)",{"name":33,"url":34},"Anthropic","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FAnthropic",{"name":9,"url":36},"https:\u002F\u002Fopencode.ai",[38,41,44,47,50,53,56,59,62,65,68,71],{"title":39,"url":40},"OpenCode v2.2.3 release notes (October 30, 2026)","https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode\u002Freleases\u002Ftag\u002Fv2.2.3",{"title":42,"url":43},"OpenCode pull request #58782: add Claude Agent provider","https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode\u002Fpull\u002F58782",{"title":45,"url":46},"Claude Agent provider design spec","https:\u002F\u002Fgithub.com\u002FTarquinen\u002Fopencode\u002Fblob\u002Fclaude-agent-provider\u002Fspecs\u002Fv2\u002Fclaude-agent-provider.md",{"title":48,"url":49},"OpenCode docs: Providers","https:\u002F\u002Fopencode.ai\u002Fv2\u002Fdocs\u002Fproviders\u002F",{"title":51,"url":52},"OpenCode docs: Models","https:\u002F\u002Fopencode.ai\u002Fv2\u002Fdocs\u002Fmodels\u002F",{"title":54,"url":55},"OpenCode docs (v1): Providers, note on Claude Pro\u002FMax plugins","https:\u002F\u002Fopencode.ai\u002Fdocs\u002Fproviders\u002F",{"title":57,"url":58},"OpenCode Console: models and pricing","https:\u002F\u002Fopencode.ai\u002Fv2\u002Fdocs\u002Fconsole\u002Fmodels\u002F",{"title":60,"url":61},"OpenCode Go: plans and usage limits","https:\u002F\u002Fopencode.ai\u002Fv2\u002Fdocs\u002Fconsole\u002Fgo\u002F",{"title":63,"url":64},"Claude Code docs: Legal and compliance","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Flegal-and-compliance",{"title":66,"url":67},"Claude Help Center: Use the Claude Agent SDK with your Claude plan","https:\u002F\u002Fsupport.claude.com\u002Fen\u002Farticles\u002F15036540-use-the-claude-agent-sdk-with-your-claude-plan",{"title":69,"url":70},"Claude Platform docs: Pricing","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fabout-claude\u002Fpricing",{"title":72,"url":73},"GitHub Docs: Supported AI models in GitHub Copilot","https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcopilot\u002Freference\u002Fai-models\u002Fsupported-models","\u002Fimages\u002Fblog\u002Fclaude-in-opencode\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fclaude-in-opencode\u002Fog.jpg","ai-engineer",[78,79,80],"en","de","hu","Claude in OpenCode: the Claude Agent provider, API keys and the other routes","How to use Claude in OpenCode: the new Claude Agent provider on your Claude plan, API keys, Console, Copilot and OpenRouter, with costs and limits.","Claude in OpenCode: a hand plugs one of two adapters into a laptop that shows a terminal window.","Using Claude in OpenCode · Balázs Csorba",[86,87,88,89,90],"Since OpenCode 2.2.3 (October 30, 2026), the built-in Claude Agent provider runs Claude through your own Claude Code login: install Claude Code, run claude auth login, then pick Claude Agent in \u002Fconnect.","Claude Code makes the model calls, and OpenCode does everything else: Claude gets OpenCode’s tools, permission rules, instructions, compaction and subagents instead of Claude Code’s own.","Anthropic’s terms forbid third-party apps from collecting or intermediating Claude.ai logins, but allow signing in to the unmodified Claude Code program with your own subscription. That is the line between the Claude Agent provider and the old Pro\u002FMax plugins.","For servers, CI, teams and remote workspaces, pay per token: an Anthropic API key, OpenCode Console, Bedrock or Vertex. Copilot, OpenRouter and the Haiku-only Go plan are the other routes.","In my test, a small bug fix with Haiku 5.5 took three steps and about five seconds through both Claude Agent and OpenCode Go, roughly $0.003 at list prices.",[92,95,98,101,104],{"q":93,"a":94},"Can I use my Claude Pro or Max subscription in OpenCode?","Yes, through the Claude Agent provider that shipped in OpenCode 2.2.3. It runs your installed Claude Code program, signed in with claude auth login, through Anthropic’s Claude Agent SDK, and usage draws from your plan limits. Do not use plugins that log in to OpenCode with your Claude.ai account directly; Anthropic’s terms prohibit that.",{"q":96,"a":97},"Does Claude Code’s CLAUDE.md or its hooks still apply in OpenCode?","No. The provider starts Claude Code with your ~\u002F.claude settings, CLAUDE.md files, hooks, MCP servers and skills turned off. OpenCode passes its own AGENTS.md files, skills and MCP instructions instead, and Claude uses OpenCode’s tools.",{"q":99,"a":100},"Why does OpenCode show a cost of $0 for Claude Agent?","Because a subscription login covers the usage. If Claude Code is signed in with an API key or a cloud account, OpenCode shows that route’s per-token price instead. A custom base URL, such as a company gateway, also shows $0, since the gateway bills separately.",{"q":102,"a":103},"Can I use Claude Agent in a remote workspace or on a server for my team?","Not in hosted OpenCode or remote workspaces: Claude Code must be installed on the same machine as the OpenCode server. For shared servers and teams, use an Anthropic API key, OpenCode Console or a cloud provider, because Anthropic’s plan limits assume ordinary, individual use.",{"q":105,"a":106},"Is Claude cheaper through OpenCode Console than through the Anthropic API?","Not cheaper. As of October 2026 Console charges the same input and output prices as Anthropic for Opus 5.5, Sonnet 5.5 and Haiku 5.5. For Sonnet 5.5 cache reads, Console charges $0.20 per million tokens, where Anthropic charges $0.10.",[108,111,114,117,120,123,126,129,132,135,138],{"id":109,"title":110},"which-routes","Which routes are there to run Claude in OpenCode?",{"id":112,"title":113},"claude-agent-setup","How do you set up the Claude Agent provider?",{"id":115,"title":116},"how-claude-agent-works","What happens when OpenCode runs Claude through Claude Code?",{"id":118,"title":119},"is-it-allowed","Is it allowed to use your Claude subscription in OpenCode?",{"id":121,"title":122},"api-key-and-console","When is an API key or OpenCode Console the better choice?",{"id":124,"title":125},"copilot-openrouter-cloud","Can you use Claude through Copilot, OpenRouter, Bedrock or Vertex?",{"id":127,"title":128},"hands-on-test","What did a small test run show?",{"id":130,"title":131},"configure-models","How do you set models and effort for Claude in OpenCode?",{"id":133,"title":134},"limitations","What does not work with Claude Agent in OpenCode?",{"id":136,"title":137},"which-to-choose","Which route should you choose?",{"id":139,"title":140},"sources","Sources",[142,160,169,172,187,274,303,304,310,312,334,359,360,366,372,375,411,414,415,418,428,435,436,442,444,447,487,502,503,509,537,547,548,565,605,615,626,627,652,654,672,673,676,714,722,723,726,756,768,769],{"type":143,"content":144},"paragraph",[145,146,150,151,155,156,159],"You can use Claude in OpenCode in two different ways. Since OpenCode 2.2.3, released on October 30, 2026, the built-in ",{"tag":147,"children":148},"strong",[149],"Claude Agent"," provider runs Claude through your own Claude Code login: install Claude Code, run ",{"tag":152,"children":153},"code",[154],"claude auth login",", choose Claude Agent in ",{"tag":152,"children":157},[158],"\u002Fconnect",", and Claude models work on your Claude plan while OpenCode keeps its own tools, permissions and session history. The other way is to pay per token or per seat through a provider: an Anthropic API key, OpenCode Console, GitHub Copilot, OpenRouter, or Amazon Bedrock and Google Vertex.",{"type":143,"content":161},[162,163,168],"What you should not use are the older community plugins that log OpenCode in with your Claude Pro or Max account directly. OpenCode stopped bundling them in version 1.3.0, its docs say Anthropic explicitly prohibits them, and Anthropic’s terms forbid third-party apps from collecting or intermediating Claude.ai credentials. This guide covers each route, how the Claude Agent provider works under the hood, what the routes cost, and what a small test run on my machine showed. My ",{"tag":164,"to":165,"children":166},"link","\u002Fblog\u002Fopencode",[167],"OpenCode review"," covers the agent itself.",{"type":170,"level":171,"id":109,"text":110},"heading",2,{"type":143,"content":173},[174,175,178,179,182,183,186],"As of October 2026 there are seven practical routes. ",{"tag":152,"children":176},[177],"opencode models"," lists the Claude models of every connected provider; on my machine five providers offered Claude, from ",{"tag":152,"children":180},[181],"claude-agent\u002Fopus"," to ",{"tag":152,"children":184},[185],"openrouter\u002Fanthropic\u002Fclaude-sonnet-5.5",".",{"type":188,"head":189,"rows":198},"table",[190,192,194,196],[191],"Route",[193],"Sign-in",[195],"Who bills",[197],"Example model ID",[199,212,222,233,244,255,265],[200,201,206,208],[149],[202,203,205],"Claude Code login (",{"tag":152,"children":204},[154],")",[207],"Your Claude plan, or the key Claude Code uses",[209],{"tag":152,"children":210},[211],"claude-agent\u002Fsonnet",[213,214,216,218],[33],[215],"API key",[217],"Anthropic, per token",[219],{"tag":152,"children":220},[221],"anthropic\u002Fclaude-sonnet-5-5",[223,225,227,229],[224],"OpenCode Console",[226],"Console API key",[228],"OpenCode, prepaid per token",[230],{"tag":152,"children":231},[232],"opencode\u002Fclaude-sonnet-5-5",[234,236,238,240],[235],"OpenCode Go",[237],"Go subscription",[239],"OpenCode, $10 a month, Haiku 5.5 only",[241],{"tag":152,"children":242},[243],"opencode-go\u002Fclaude-haiku-5-5",[245,247,249,251],[246],"GitHub Copilot",[248],"GitHub device login",[250],"Your Copilot plan",[252],{"tag":152,"children":253},[254],"github-copilot\u002Fclaude-sonnet-5.5",[256,258,260,262],[257],"OpenRouter",[259],"OpenRouter key",[261],"OpenRouter credits",[263],{"tag":152,"children":264},[185],[266,268,270,272],[267],"Bedrock, Vertex",[269],"AWS or Google credentials",[271],"Your cloud account",[273],"depends on the account",{"type":143,"content":275},[276,277,280,281,284,285,288,289,292,293,295,296,299,300,186],"The model IDs follow each provider’s conventions. Claude Agent uses Claude Code’s aliases such as ",{"tag":152,"children":278},[279],"opus",", ",{"tag":152,"children":282},[283],"sonnet"," and ",{"tag":152,"children":286},[287],"haiku",", and Claude Code resolves them to the current model, for example ",{"tag":152,"children":290},[291],"claude-opus-5-5"," for ",{"tag":152,"children":294},[279],". Copilot and OpenRouter write versions with a dot, as in ",{"tag":152,"children":297},[298],"claude-sonnet-5.5","; the Anthropic provider and OpenCode Console use hyphens, as in ",{"tag":152,"children":301},[302],"claude-sonnet-5-5",{"type":170,"level":171,"id":112,"text":113},{"type":143,"content":305},[306,307,186],"You need Claude Code 2.1.248 or later, signed in, on the same machine as the OpenCode server. Then you connect Claude Agent like any other provider. The model list comes from Claude Code, and effort levels are variants such as ",{"tag":152,"children":308},[309],"claude-agent\u002Fopus#high",{"type":152,"code":311},"# 1. Install or update Claude Code (2.1.248 or later), then sign in\nclaude update\nclaude auth login\n\n# 2. In the OpenCode TUI: connect the provider and pick a model\n\u002Fconnect     # choose Claude Agent\n\u002Fmodels      # for example claude-agent\u002Fsonnet\n\n# 3. Or run it from the shell, with an effort variant\nopencode run -m \"claude-agent\u002Fopus#high\" \"Explain why tests\u002Fapi fails\"",{"type":143,"content":313},[314,315,318,319,322,323,326,327,330,331,333],"OpenCode looks for ",{"tag":152,"children":316},[317],"claude"," on the ",{"tag":152,"children":320},[321],"PATH",". To use another copy, set ",{"tag":152,"children":324},[325],"OPENCODE_CLAUDE_PATH"," on the OpenCode server, for example with ",{"tag":152,"children":328},[329],"opencode service set env OPENCODE_CLAUDE_PATH \u002Fopt\u002Fclaude\u002Fbin\u002Fclaude",". Version 2.2.4, released the same day as 2.2.3, added a guided setup to the desktop and web app: choosing Claude Agent shows the ",{"tag":152,"children":332},[154]," command, an install button for Claude Code, and a check that waits until OpenCode has confirmed that Claude Code is installed and signed in. When the check fails, the dialog names the reason, such as not installed, not signed in or too old, and offers to check again.",{"type":143,"content":335},[336,337,340,341,280,344,340,347,350,351,354,355,358],"Any Claude Code login works, not only a subscription. If Claude Code is signed in with an API key, or set up for Claude Platform on AWS, Bedrock, Vertex or Microsoft Foundry, the provider uses that login. Connection settings in OpenCode’s config are passed on to Claude Code: ",{"tag":152,"children":338},[339],"settings.baseURL"," becomes ",{"tag":152,"children":342},[343],"ANTHROPIC_BASE_URL",{"tag":152,"children":345},[346],"settings.apiKey",{"tag":152,"children":348},[349],"ANTHROPIC_API_KEY",", and ",{"tag":152,"children":352},[353],"headers"," become ",{"tag":152,"children":356},[357],"ANTHROPIC_CUSTOM_HEADERS",". That is how you send the provider through a company LLM gateway.",{"type":170,"level":171,"id":115,"text":116},{"type":143,"content":361},[362,363,365],"Claude Code makes the model calls, and OpenCode does everything else. OpenCode starts your installed ",{"tag":152,"children":364},[317]," program through Anthropic’s Claude Agent SDK, with one long-running process per session, and gives it OpenCode’s tools instead of Claude Code’s own. When Claude calls a tool, the provider holds the call, OpenCode runs it with its normal permission prompts, and the result goes back to Claude. The design spec states that OpenCode never sits between Claude Code and Anthropic, never changes Claude Code’s requests and never reads Claude Code’s saved login.",{"type":367,"src":368,"alt":369,"wide":370,"caption":371},"image","\u002Fimages\u002Fblog\u002Fclaude-in-opencode\u002Fdiagram-13.webp","OpenCode running Claude via Claude Code: Prompts go via the Agent SDK and your claude login; tool calls return to OpenCode.",true,"OpenCode starts your installed claude program through the Claude Agent SDK, one process per session. Claude Code sends the request to Anthropic with your own login, so usage counts against your plan. When Claude calls a tool, the provider holds the call and OpenCode runs it with its own permission rules, then returns the result to Claude.",{"type":143,"content":373},[374],"The provider deliberately switches off most of Claude Code’s own machinery so that OpenCode behaves the same whichever model you pick:",{"type":376,"ordered":377,"items":378},"list",false,[379,384,393,398,403],[380,383],{"tag":147,"children":381},[382],"Tools:"," Claude Code’s built-in tools are off. Claude only gets OpenCode’s tools, so a single permission system applies and the history looks the same whichever model wrote it.",[385,388,389,392],{"tag":147,"children":386},[387],"Settings:"," Claude Code reads none of your ",{"tag":152,"children":390},[391],"~\u002F.claude"," settings, CLAUDE.md files, hooks, MCP servers or skills. OpenCode adds its own instructions on top of Claude Code’s system prompt: the selected agent’s prompt, AGENTS.md files, skills and MCP instructions.",[394,397],{"tag":147,"children":395},[396],"History:"," OpenCode’s history is the source of truth. When you switch to Claude in the middle of a session, everything Claude has not seen is sent as one message, so you can move between Claude and other models in the same session.",[399,402],{"tag":147,"children":400},[401],"Compaction and subagents:"," OpenCode runs both. Claude Code’s auto compaction, auto memory and tool search are off.",[404,407,408,410],{"tag":147,"children":405},[406],"Process lifetime:"," the ",{"tag":152,"children":409},[317]," process stops after 5 minutes idle, and the next message resumes the saved Claude session. Time spent running OpenCode tools does not count as idle.",{"type":143,"content":412},[413],"One practical consequence is that tool calls run one at a time. According to the spec, the provider has to match each result to Claude’s call ID and only tracks one ID at a time, so it never marks tools as safe to run in parallel.",{"type":170,"level":171,"id":118,"text":119},{"type":143,"content":416},[417],"Using the Claude Agent provider with your own subscription fits Anthropic’s published rules as of October 2026; plugins that reuse your Claude.ai login do not. The difference is who handles the credentials. Anthropic’s legal page says OAuth sign-in is intended for subscribers and for ordinary use of Claude Code and other native Anthropic applications. It does not permit third-party developers to offer Claude.ai login in their own apps, to route requests through Free, Pro, Max or Ultra plan credentials on behalf of their users, or to collect, store or intermediate Claude.ai credentials or session tokens. The same section says this does not prevent an end user from signing in to the unmodified Claude Code binary with their own Claude subscription.",{"type":143,"content":419},[420,421,423,424,427],"The Claude Agent provider is built along exactly that line: it runs your own, unmodified ",{"tag":152,"children":422},[317],", and you sign in through Anthropic’s flow in your terminal. Anthropic’s help center, updated in October 2026, also says that Agent SDK usage, ",{"tag":152,"children":425},[426],"claude -p"," and third-party app usage still draw from your subscription limits when you are signed in with your plan. This is a reversal from earlier in 2026: OpenCode’s v1 provider docs still say that plugins for using Claude Pro or Max in OpenCode exist, that Anthropic explicitly prohibits this, and that OpenCode has not bundled them since version 1.3.0.",{"type":429,"variant":430,"title":431,"body":432},"callout","warn","Ordinary, individual use only",[433],[434],"Anthropic’s advertised Pro, Max and Ultra limits assume ordinary, individual use of Claude Code and the Agent SDK, and Anthropic says it may enforce its credential rules without prior notice. Do not put a personal Claude subscription behind an OpenCode server that a team shares. Use API keys, Team or Enterprise seats, or a cloud provider for that.",{"type":170,"level":171,"id":121,"text":122},{"type":143,"content":437},[438,439,441],"Pay per token when the work runs on a server, in CI, for a team or in a remote workspace. The Claude Agent provider needs Claude Code installed and signed in on the same machine as the OpenCode server, so it is not available in hosted OpenCode or remote workspaces. With an API key, OpenCode calls Anthropic directly. You can connect the key with ",{"tag":152,"children":440},[158],", or hand it to the background server as an environment variable:",{"type":152,"code":443},"# Anthropic API key for the shared background server\nopencode service set env ANTHROPIC_API_KEY sk-ant-...\nopencode auth list\n\n# Or for a single run with a private server\nANTHROPIC_API_KEY=sk-ant-... opencode --standalone",{"type":143,"content":445},[446],"OpenCode Console resells the same models on prepaid credit, which is convenient if you want one OpenCode bill across several vendors. As of October 2026 its prices match Anthropic’s for input and output tokens. The one difference in the table is the Sonnet 5.5 cache read, and in a long coding session most input tokens are cache reads.",{"type":188,"head":448,"rows":459},[449,451,453,455,457],[450],"Per 1M tokens, October 2026",[452],"Anthropic API: input \u002F output",[454],"Anthropic cache read",[456],"Console: input \u002F output",[458],"Console cache read",[460,469,478],[461,463,465,467,468],[462],"Claude Opus 5.5",[464],"$4.00 \u002F $20.00",[466],"$0.20",[464],[466],[470,472,474,476,477],[471],"Claude Sonnet 5.5",[473],"$2.00 \u002F $10.00",[475],"$0.10",[473],[466],[479,481,483,485,486],[480],"Claude Haiku 5.5, up to 100K",[482],"$0.10 \u002F $0.50",[484],"$0.01",[482],[484],{"type":143,"content":488},[489,490,182,493,496,497,501],"Five-minute cache writes cost 1.25 times the input price at both: $5.00 for Opus 5.5, $2.50 for Sonnet 5.5 and $0.125 for Haiku 5.5. OpenCode places prompt-cache breakpoints on Anthropic routes automatically. Only when Claude sits behind an OpenAI-compatible proxy such as LiteLLM do you set ",{"tag":152,"children":491},[492],"compatibility.cacheFormat",{"tag":152,"children":494},[495],"\"anthropic\""," on those models, because OpenCode cannot tell from the proxy that they need Anthropic-style breakpoints. My ",{"tag":164,"to":498,"children":499},"\u002Fblog\u002Fclaude-plans-pricing-usage-limits",[500],"Claude pricing guide"," compares plan limits with API costs in more detail.",{"type":170,"level":171,"id":124,"text":125},{"type":143,"content":504},[505,506,508],"Yes, all four work, and they make sense when you already pay for that service. ",{"tag":147,"children":507},[246]," connects through GitHub’s device login, and the account needs Copilot Chat access. GitHub lists Claude Haiku 4.5 and 5.5, Sonnet 4.6, 5 and 5.5, Opus 4.8, 5 and 5.5, and Fable 5 and 5.1 as generally available in Copilot, but Copilot Free and Student users only get models through auto model selection. OpenCode fetches the account’s current model list after login.",{"type":143,"content":510},[511,513,514,517,518,520,521,524,525,528,529,532,533,536],{"tag":147,"children":512},[257]," takes an ",{"tag":152,"children":515},[516],"OPENROUTER_API_KEY"," or a connected account, and models use the full OpenRouter ID after the prefix, such as ",{"tag":152,"children":519},[185],". My model list also showed moving aliases such as ",{"tag":152,"children":522},[523],"openrouter\u002F~anthropic\u002Fclaude-sonnet-latest",". ",{"tag":147,"children":526},[527],"Amazon Bedrock"," uses the AWS default credential chain, and a named AWS profile is the simplest durable setup. ",{"tag":147,"children":530},[531],"Google Vertex"," uses Application Default Credentials and needs a project before its models appear. The provider spec notes that Bedrock’s regional model IDs, such as ",{"tag":152,"children":534},[535],"us.anthropic.claude-opus-5-5",", are priced 10% higher than Anthropic’s list prices.",{"type":143,"content":538},[539,541,542,546],{"tag":147,"children":540},[235]," is the cheapest way in, but it only covers Claude Haiku 5.5 among the Claude models. The Go plan costs $10 a month, and OpenCode estimates 3,850 Haiku 5.5 requests per five hours on it, assuming 1,100 input, 55,000 cached and 240 output tokens per request. That suits a subagent or a cheap side model, not a main coding agent. My ",{"tag":164,"to":543,"children":544},"\u002Fblog\u002Fclaude-haiku-5-5",[545],"Haiku 5.5 guide"," covers which jobs it handles well.",{"type":170,"level":171,"id":127,"text":128},{"type":143,"content":549},[550,551,554,555,558,559,562,563,186],"Both subscription routes fixed the same small bug in about five seconds, and the Claude Agent route used OpenCode’s tools as the spec describes. I ran one task with OpenCode 2.2.4 and Claude Code 2.1.314: a two-line Python file whose ",{"tag":152,"children":552},[553],"add()"," subtracted, with the prompt to fix it and describe the change in one sentence. Both runs used Haiku 5.5 with ",{"tag":152,"children":556},[557],"opencode run --format json",", once through ",{"tag":152,"children":560},[561],"claude-agent\u002Fhaiku"," on my Claude plan and once through ",{"tag":152,"children":564},[243],{"type":188,"head":566,"rows":578},[567,568,570,572,574,576],[191],[569],"Steps",[571],"Cache write",[573],"Cache read",[575],"Output",[577],"At list prices",[579,593],[580,583,585,587,589,591],[581],{"tag":152,"children":582},[561],[584],"read, edit, answer",[586],"16,901",[588],"52,057",[590],"198",[592],"≈ $0.003",[594,597,598,600,602,604],[595],{"tag":152,"children":596},[243],[584],[599],"20,843",[601],"41,357",[603],"182",[592],{"type":143,"content":606},[607,608,284,611,614],"OpenCode showed a cost of $0 for both runs, because each plan covers the usage. The list-price column is my own calculation at Haiku 5.5 prices, assuming five-minute cache writes. The prompts were similar in size: about 22,900 tokens through Claude Agent, with Claude Code’s system prompt, and about 20,700 through Go, with OpenCode’s own. The first Claude Agent step already read 6,226 tokens from cache in a fresh session, most likely the part of Claude Code’s system prompt still cached from my earlier Claude Code use. Both transcripts show the ",{"tag":152,"children":609},[610],"read",{"tag":152,"children":612},[613],"edit"," tool calls coming from OpenCode.",{"type":143,"content":616},[617,618,621,622,625],"Two practical notes from the test. My OpenCode Console account had no credit, and that route failed at once with a 402 “Insufficient account funds” error, since Console is prepaid. And ",{"tag":152,"children":619},[620],"opencode run"," called from a script without a terminal waited for input until I closed standard input with ",{"tag":152,"children":623},[624],"\u003C \u002Fdev\u002Fnull","; with that, every run finished normally.",{"type":170,"level":171,"id":130,"text":131},{"type":143,"content":628},[629,630,633,634,637,638,284,641,644,645,284,648,651],"Set a default model in ",{"tag":152,"children":631},[632],"opencode.jsonc"," and give individual agents their own model with an optional ",{"tag":152,"children":635},[636],"#variant",". A common split is a strong model for planning, a mid-size model for building and a small model for search. OpenCode’s built-in agents are ",{"tag":152,"children":639},[640],"build",{"tag":152,"children":642},[643],"plan"," as primary agents and ",{"tag":152,"children":646},[647],"general",{"tag":152,"children":649},[650],"explore"," as subagents:",{"type":152,"code":653},"{\n  \"$schema\": \"https:\u002F\u002Fopencode.ai\u002Fconfig.json\",\n  \"model\": \"claude-agent\u002Fsonnet\",\n  \"agents\": {\n    \"plan\": { \"model\": \"claude-agent\u002Fopus#high\" },\n    \"explore\": { \"model\": \"claude-agent\u002Fhaiku\" }\n  }\n}",{"type":143,"content":655},[656,659,660,663,664,667,668,671],{"tag":152,"children":657},[658],"#high"," selects an effort variant. Variant names come from the model’s catalog metadata, and an unknown variant fails with a model-resolution error, so check ",{"tag":152,"children":661},[662],"\u002Fmodels"," before you commit a config. A subagent without its own model inherits the parent session’s model. With the Anthropic provider the same config uses IDs such as ",{"tag":152,"children":665},[666],"anthropic\u002Fclaude-opus-5-5#high",". On the Claude Agent provider, temperature, top-p, top-k, seed and stop sequences are not supported, and setting ",{"tag":152,"children":669},[670],"CLAUDE_CODE_EFFORT_LEVEL"," in your shell has no effect, because the provider clears it so that the effort chosen in OpenCode applies.",{"type":170,"level":171,"id":133,"text":134},{"type":143,"content":674},[675],"The provider gives you Claude’s models inside OpenCode, not Claude Code’s product features. The OpenCode docs and the design spec list these gaps:",{"type":376,"ordered":377,"items":677},[678,680,682,691,712],[679],"No hosted OpenCode and no remote workspaces, because Claude Code must run on the same machine as the OpenCode server.",[681],"Claude Code’s system prompt replaces OpenCode’s built-in agent prompts; custom agent prompts still apply.",[683,684,284,687,690],"Plugin ",{"tag":152,"children":685},[686],"http.request",{"tag":152,"children":688},[689],"http.response"," hooks do not run, because Claude Code makes the API calls.",[692,693,696,697,700,701,704,705,708,709,711],"Claude Code features without an OpenCode equivalent are missing: ",{"tag":152,"children":694},[695],"\u002Fusage"," and the options shown at a plan limit, ",{"tag":152,"children":698},[699],"\u002Floop",", auto mode, agent teams, cloud sessions and ",{"tag":152,"children":702},[703],"\u002Fteleport",", computer use, sandboxed Bash and bundled skills such as ",{"tag":152,"children":706},[707],"\u002Fsimplify",". OpenCode’s own ",{"tag":152,"children":710},[695]," shows Console usage instead.",[713],"Tool calls run one at a time, as described above.",{"type":143,"content":715},[716,717,721],"If you rely on those Claude Code features every day, run Claude Code itself; my ",{"tag":164,"to":718,"children":719},"\u002Fblog\u002Fclaude-code",[720],"Claude Code review"," covers it. The provider is for people who prefer OpenCode’s interface, its multi-model sessions and its permission rules, but want their Claude plan behind them.",{"type":170,"level":171,"id":136,"text":137},{"type":143,"content":724},[725],"Pick the route that matches who uses OpenCode and where it runs:",{"type":376,"ordered":370,"items":727},[728,733,738,743,751],[729,732],{"tag":147,"children":730},[731],"Your own machine and an existing Claude Pro, Max or Ultra plan:"," the Claude Agent provider. It uses limits you already pay for and keeps OpenCode’s workflow.",[734,737],{"tag":147,"children":735},[736],"A team, CI, a server or a remote workspace:"," an Anthropic API key, or Bedrock or Vertex if your company already runs there. Choose OpenCode Console if you want one prepaid OpenCode bill across vendors.",[739,742],{"tag":147,"children":740},[741],"An existing Copilot seat:"," the GitHub Copilot provider, within your Copilot plan’s models and limits.",[744,747,748,750],{"tag":147,"children":745},[746],"A cheap small model on the side:"," OpenCode Go for Haiku 5.5, for example as the ",{"tag":152,"children":749},[650]," subagent.",[752,755],{"tag":147,"children":753},[754],"Routing and fallbacks across vendors:"," OpenRouter, if you already use it.",{"type":143,"content":757},[758,759,763,764,186],"Whatever you pick, keep your project instructions in AGENTS.md rather than CLAUDE.md, since that is what OpenCode passes to every model, including Claude through the Claude Agent provider. The ",{"tag":164,"to":760,"children":761},"\u002Fblog\u002Fagents-md-skills-mcp-cli-decision-matrix",[762],"decision matrix for AGENTS.md, skills, MCP and CLIs"," helps with that split. If you are setting up coding agents for a team and need the cost and data-protection side sorted out, that is part of my ",{"tag":164,"to":765,"children":766},"\u002Fexpertise\u002Fai-engineer",[767],"AI engineering work",{"type":170,"level":171,"id":139,"text":140},{"type":376,"ordered":370,"items":770},[771,775,778,781,784,787,790,793,796,799,802,805],[772],{"tag":773,"href":40,"children":774},"a",[39],[776],{"tag":773,"href":43,"children":777},[42],[779],{"tag":773,"href":46,"children":780},[45],[782],{"tag":773,"href":49,"children":783},[48],[785],{"tag":773,"href":52,"children":786},[51],[788],{"tag":773,"href":55,"children":789},[54],[791],{"tag":773,"href":58,"children":792},[57],[794],{"tag":773,"href":61,"children":795},[60],[797],{"tag":773,"href":64,"children":798},[63],[800],{"tag":773,"href":67,"children":801},[66],[803],{"tag":773,"href":70,"children":804},[69],[806],{"tag":773,"href":73,"children":807},[72],[809,871,922,974],{"slug":810,"published":811,"updated":812,"minutes":813,"category":7,"tags":814,"tagPages":818,"keywords":819,"about":831,"sources":840,"cover":865,"og":866,"expertise":76,"locales":867,"lang":78,"title":868,"description":869,"coverAlt":870},"agent-loop-explained","2026-07-16","2026-09-04",10,[815,12,816,10,817],"Agent loop","Tool calling","Stop conditions",[16,15],[820,821,822,823,824,825,826,827,828,829,830],"agent loop","human in the loop AI agent","agentic loop","AI agent loop","tool calling loop","Ralph loop coding agent","Claude Code \u002Floop","Claude Code \u002Fgoal","how to stop an AI agent from looping","ReAct agent pattern","stop_reason tool_use",[832,835,838],{"name":833,"url":834},"Intelligent agent","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FIntelligent_agent",{"name":836,"url":837},"Large language model","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FLarge_language_model",{"name":10,"url":839},"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Foverview",[841,844,847,850,853,856,859,862],{"title":842,"url":843},"Anthropic: Building effective agents (Dec 2024)","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Fbuilding-effective-agents",{"title":845,"url":846},"Yao et al.: ReAct: Synergizing Reasoning and Acting in Language Models (2022)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2210.03629",{"title":848,"url":849},"Claude API docs: Handling stop reasons","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fbuild-with-claude\u002Fhandling-stop-reasons",{"title":851,"url":852},"Anthropic: Effective harnesses for long-running agents (Nov 2025)","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Feffective-harnesses-for-long-running-agents",{"title":854,"url":855},"Simon Willison: Red\u002Fgreen TDD (Agentic Engineering Patterns)","https:\u002F\u002Fsimonwillison.net\u002Fguides\u002Fagentic-engineering-patterns\u002Fred-green-tdd\u002F",{"title":857,"url":858},"Geoffrey Huntley: Ralph Wiggum as a software engineer (Jul 2025)","https:\u002F\u002Fghuntley.com\u002Fralph\u002F",{"title":860,"url":861},"Claude Code docs: Run prompts on a schedule (\u002Floop)","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fscheduled-tasks",{"title":863,"url":864},"Claude Code docs: Keep Claude working toward a goal (\u002Fgoal)","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fgoal","\u002Fimages\u002Fblog\u002Fagent-loop-explained\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fagent-loop-explained\u002Fog.jpg",[78,79,80],"The agent loop, explained: how coding agents run, and how to make them stop","How the agent loop works in code, which stop conditions and budgets to enforce, and how outer loops like Ralph and Claude Code \u002Floop and \u002Fgoal behave.","The agent loop: a small robot walks a circular track that a striped barrier arm crosses next to a finish flag.",{"slug":872,"published":873,"minutes":874,"category":7,"tags":875,"tagPages":880,"keywords":881,"about":892,"sources":897,"cover":916,"og":917,"expertise":76,"locales":918,"lang":78,"title":919,"description":920,"coverAlt":921},"claude-code-review","2026-10-21",11,[10,876,877,878,879],"Code review","GitHub","Pull requests","Review costs",[15],[882,883,884,885,886,887,888,889,890,891],"claude code review","claude code review github","claude code review pricing","code review generally available","ai pull request review","claude github app review","review level quick standard deep","claude code review setup","review spend limit","automated code review agents",[893,895],{"name":894,"url":31},"Claude",{"name":876,"url":896},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCode_review",[898,901,904,907,910,913],{"title":899,"url":900},"Claude: Code Review is now generally available (Oct 15, 2026)","https:\u002F\u002Fclaude.com\u002Fresources\u002Farticles\u002Fcode-review-is-now-generally-available",{"title":902,"url":903},"Claude Code docs: Code Review","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcode-review",{"title":905,"url":906},"Claude Code docs: Set up Code Review","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcode-review-setup",{"title":908,"url":909},"Claude Code docs: Code Review costs and usage","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcode-review-costs",{"title":911,"url":912},"Claude: Code Review research preview announcement","https:\u002F\u002Fclaude.com\u002Fresources\u002Farticles\u002Fcode-review",{"title":914,"url":915},"Claude Code docs: GitHub Actions","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fgithub-actions","\u002Fimages\u002Fblog\u002Fclaude-code-review\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fclaude-code-review\u002Fog.jpg",[78,79,80],"Claude Code Review is generally available: how the multi-agent review works and costs","Claude Code Review, now GA for Team and Enterprise: how agents verify findings, set review levels, cap spend, and compare with the GitHub Action.","Claude Code Review: three magnifying glasses examine a sheet of lines, and one line is circled and checked.",{"slug":923,"published":924,"minutes":6,"category":7,"tags":925,"tagPages":930,"keywords":931,"about":943,"sources":946,"cover":968,"og":969,"expertise":76,"locales":970,"lang":78,"title":971,"description":972,"coverAlt":973},"claude-skills-guide","2026-10-20",[926,927,10,928,929],"Claude skills","SKILL.md","Agent Skills","Progressive disclosure",[15],[932,933,934,935,936,937,938,939,940,941,942],"claude skills","claude code skills","how to create a claude skill","skill.md format","agent skills specification","claude skill frontmatter","skill description triggering","progressive disclosure skills","claude skills vs mcp","skills api","custom slash commands skills",[944,945],{"name":30,"url":31},{"name":33,"url":34},[947,950,953,956,959,962,965],{"title":948,"url":949},"Claude Code documentation: skills","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fskills",{"title":951,"url":952},"Agent Skills overview, Claude API documentation","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fagents-and-tools\u002Fagent-skills\u002Foverview",{"title":954,"url":955},"Skill authoring best practices, Claude API documentation","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fagents-and-tools\u002Fagent-skills\u002Fbest-practices",{"title":957,"url":958},"Agent Skills specification","https:\u002F\u002Fagentskills.io\u002Fspecification",{"title":960,"url":961},"Evaluating skill output quality, Agent Skills documentation","https:\u002F\u002Fagentskills.io\u002Fskill-creation\u002Fevaluating-skills",{"title":963,"url":964},"Equipping agents for the real world with Agent Skills, Anthropic engineering blog","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Fequipping-agents-for-the-real-world-with-agent-skills",{"title":966,"url":967},"The state of Claude skills in 2026, SkillGild analysis of Ahrefs data","https:\u002F\u002Fdev.to\u002Fskillgild\u002Fthe-state-of-claude-skills-in-2026-what-38000-searches-say-248n","\u002Fimages\u002Fblog\u002Fclaude-skills-guide\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fclaude-skills-guide\u002Fog.jpg",[78,79,80],"Claude skills: how to write a SKILL.md that loads at the right moment","How to write a Claude skill: directory layout, frontmatter fields and limits, progressive disclosure, descriptions that trigger, scripts and testing.","Claude skills and SKILL.md: an open toolbox holds upright folders, and one folder is pulled out with a single sheet.",{"slug":975,"published":976,"minutes":874,"category":7,"tags":977,"tagPages":981,"keywords":982,"about":995,"sources":1005,"cover":1040,"og":1041,"expertise":76,"locales":1042,"lang":78,"title":1043,"description":1044,"coverAlt":1045},"coding-agents-legacy-codebase-migration","2026-10-17",[978,12,979,980,876],"Legacy migration","Strangler fig","Testing",[16],[983,984,985,986,987,988,989,990,991,992,993,994],"legacy code migration ai","coding agent legacy codebase","strangler fig pattern ai","characterization tests legacy code","ai code migration review","agent assisted refactoring","legacy modernization coding agent","differential testing migration","shadow traffic migration","ai code review gate","test harness before migration","llm code migration",[996,999,1002],{"name":997,"url":998},"Legacy code","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FLegacy_code",{"name":1000,"url":1001},"Characterization test","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCharacterization_test",{"name":1003,"url":1004},"Strangler fig pattern","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FStrangler_fig_pattern",[1006,1009,1011,1014,1017,1019,1022,1025,1028,1031,1034,1037],{"title":1007,"url":1008},"Martin Fowler: Strangler Fig (2024)","https:\u002F\u002Fmartinfowler.com\u002Fbliki\u002FStranglerFigApplication.html",{"title":1010,"url":1001},"Wikipedia: Characterization test",{"title":1012,"url":1013},"Google Research: Accelerating code migrations with AI (2024)","https:\u002F\u002Fresearch.google\u002Fblog\u002Faccelerating-code-migrations-with-ai\u002F",{"title":1015,"url":1016},"Ziftci et al.: Migrating Code At Scale With LLMs At Google (arXiv 2504.09691)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.09691",{"title":1018,"url":852},"Anthropic: Effective harnesses for long-running agents (2025)",{"title":1020,"url":1021},"Anthropic: Redesigning source control at Anthropic (2026)","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Fredesigning-source-control",{"title":1023,"url":1024},"METR: Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity","https:\u002F\u002Fmetr.org\u002Fblog\u002F2025-07-10-early-2025-ai-experienced-os-dev-study\u002F",{"title":1026,"url":1027},"Chand et al.: Why Industry Migrates and When It Trusts LLMs (ESEM 2026)","https:\u002F\u002Fdrops.dagstuhl.de\u002Fentities\u002Fdocument\u002F10.4230\u002FLIPIcs.ESEM.2026.85",{"title":1029,"url":1030},"Li et al.: Environment-in-the-Loop: Rethinking Code Migration with LLM-based Agents (arXiv 2602.09944)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2602.09944",{"title":1032,"url":1033},"AWS: Amazon Q Developer just reached a $260 million dollar milestone (2024)","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fdevops\u002Famazon-q-developer-just-reached-a-260-million-dollar-milestone\u002F",{"title":1035,"url":1036},"OpenAI: Why SWE-bench Verified no longer measures frontier coding capabilities (2026)","https:\u002F\u002Fopenai.com\u002Findex\u002Fwhy-we-no-longer-evaluate-swe-bench-verified\u002F",{"title":1038,"url":1039},"GitHub Docs: About GitHub Copilot cloud agent","https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcopilot\u002Fconcepts\u002Fagents\u002Fcoding-agent\u002Fabout-coding-agent","\u002Fimages\u002Fblog\u002Fcoding-agents-legacy-codebase-migration\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fcoding-agents-legacy-codebase-migration\u002Fog.jpg",[78,79,80],"Migrating a legacy codebase with coding agents: a strangler fig playbook","How to use coding agents on a legacy migration: characterization tests first, one seam per task, review gates and differential verification.","Legacy migration with coding agents: a robot carries a brick from an old vine-covered house to a new one being built.",1793451241139]