Skip to content

How to Use Claude in OpenCode CLI After Anthropic Blocked Third-Party Access?

One morning, I opened my terminal, typed opencode, and got slapped with an authentication error. No warning, no email—just blocked. Claude was no longer accessible through my favorite CLI tool.

What Happened?

Anthropic updated their Terms of Service in February 2026 to prohibit third-party applications from accessing Claude models. If you were using OpenCode, Cursor, or similar tools with Claude, you suddenly found yourself locked out.

The change wasn’t widely communicated beforehand. I discovered it the hard way—when my workflow broke.

Error I encountered
Error: Authentication failed. Third-party access to Claude models
is no longer permitted under Anthropic's Terms of Service.
Please use official Anthropic interfaces.

The Proxy Plugin Workaround

After some searching, I found a Reddit thread where others faced the same issue. One solution mentioned repeatedly: proxy plugins.

The most popular option is opencode-claude-max-proxy. It intercepts API calls and handles authentication through alternative methods.

Setting Up the Proxy

Here’s how I got it working:

Clone and install the proxy
git clone https://github.com/rynfar/opencode-claude-max-proxy
cd opencode-claude-max-proxy
npm install
npm run build
Configure and start
export ANTHROPIC_API_KEY=your_api_key_here
npm start

Then I updated my OpenCode configuration:

OpenCode config with proxy
{
"providers": {
"claude-proxy": {
"type": "anthropic",
"baseUrl": "http://localhost:8080/v1",
"apiKey": "${ANTHROPIC_API_KEY}",
"models": {
"small": "claude-3-5-haiku-20241022",
"large": "claude-3-5-sonnet-20241022"
}
}
},
"defaultProvider": "claude-proxy"
}

The Gotchas I Encountered

The proxy worked, but I noticed some quirks:

  1. Duplicate writing: Sonnet and Opus models sometimes produce duplicate content. Not every time, but often enough to be annoying.

  2. Model behavior differences: The output isn’t always identical to native API usage. Subtle differences in reasoning and formatting.

  3. Gray area: This workaround may not last. Anthropic could block it at any time.

Is This Sustainable?

I asked myself: should I rely on this?

Comparison of alternatives
| Factor | Claude Proxy | ChatGPT Pro | GitHub Copilot |
|-------------------|--------------|-------------|----------------|
| ToS Compliant | No | Yes | Yes |
| Ban Risk | High | None | None |
| Monthly Cost | API usage | $20 | $10-20 |
| Duplicate Bug | Possible | No | No |
| Long-term Viability| Uncertain | Stable | Stable |

The Reddit community echoed similar concerns:

“I’ll use this until they ban me.”

“Plenty of alternative plugins for Claude auth. By the download numbers I see a lot of people are still using it.”

My Recommendation

If you need immediate continuity, the proxy plugin works. But treat it as a bridge, not a destination.

What I’m doing:

  1. Using the proxy for critical work right now
  2. Evaluating ChatGPT Pro and GitHub Copilot for long-term replacement
  3. Monitoring the proxy repository for updates and breaking changes
  4. Keeping a backup migration plan ready

Alternative Paths

If you want to avoid the risk entirely:

  • ChatGPT Pro: Similar pricing ($20/month), strong coding capabilities, officially supported
  • GitHub Copilot: Cheaper ($10-20/month), deep IDE integration, Microsoft backing
  • Native Claude tools: Use Anthropic’s interfaces directly—web, API, or official apps

The ToS change forced many of us to reconsider tool dependencies. Proxy plugins offer a temporary fix, but the smarter play is planning your exit strategy.


Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments