DEV Community

Robin
Robin

Posted on

Roo Code and the Claude Max Ban: What Actually Happened and How to Fix It

If you're a Roo Code user who got hit by the January Claude Max enforcement, here's exactly what happened and how to get back up in under 60 seconds.


What happened in January 2026

Anthropic enforced their Claude Max terms of service. Specifically: automated tool access — AI coding assistants, agents, third-party integrations — is not permitted on consumer subscription plans.

The error most Roo Code users saw:

This credential is only authorized for use with Claude Code and cannot be used for other API requests
Enter fullscreen mode Exit fullscreen mode

This isn't a bug. It's the policy. Roo Code was using OAuth tokens from your Claude Max subscription to authenticate against the API. Anthropic blocked that path.

Here's the key thing most guides miss: the API itself was never restricted. Only the subscription-based OAuth path was. The Anthropic API — accessed with a standard API key — was, is, and will remain available for exactly this kind of automated tool access.


The fix: switch from subscription auth to API auth

Roo Code has a built-in "OpenAI Compatible" provider setting. This is the one you want.

Instead of using your Claude Max subscription credentials, you point Roo Code at an OpenAI-compatible API endpoint and authenticate with a standard API key. Same tool use, same multi-file editing — the API behaviour is identical because it's the same underlying models via the same provider.

Option 1: Direct Anthropic API

If you have an Anthropic API account:

API Provider: OpenAI Compatible
Base URL: https://api.anthropic.com/v1
API Key: sk-ant-your-api-key
Model: claude-opus-4-6
Enter fullscreen mode Exit fullscreen mode

Caveat: Direct API access has no routing intelligence. You'll pay Opus prices for every request — including trivial ones like "what does this variable do?"

Option 2: Routing layer (what I use)

I built Komilion after this hit my own setup. It sits between Roo Code and the models, routing simple requests to cheap models and complex requests to Opus. OpenAI-compatible, so the integration is identical.

API Provider: OpenAI Compatible
Base URL: https://www.komilion.com/api/v1
API Key: ck_your_komilion_key
Model: neo-mode/balanced
Enter fullscreen mode Exit fullscreen mode

The neo-mode/balanced model selector automatically routes based on request complexity. A debugging question costs ~$0.003. A complex refactor uses Opus at ~$0.08.

$5 free credits at komilion.com, no card required.


Step-by-step: Roo Code setup

  1. Open VS Code → Roo Code sidebar → Settings icon
  2. API Provider: Select "OpenAI Compatible"
  3. Base URL: https://www.komilion.com/api/v1
  4. API Key: Your Komilion API key (from komilion.com/dashboard)
  5. Model ID: neo-mode/balanced (or neo-mode/premium for Opus on every request)
  6. Save → test with any prompt

That's it. All Roo Code features work: tool use, multi-file context, MCP servers, the works.


What model actually runs?

When you use neo-mode/balanced, Komilion checks the request against a benchmark-calibrated scoring system:

  • Simple questions, formatting, translations → Gemini 3 Flash (~$0.0008/request)
  • Medium complexity code tasks → Gemini 3 Pro or Sonnet 4.6 (~$0.01–0.04)
  • Complex reasoning, architecture → Opus 4.6 (~$0.08)

The decision happens in under 5ms. From Roo Code's perspective it's talking to a single endpoint.

Sprint 9 benchmark (February 2026): "What's wrong with this code?" — Frugal mode answered correctly at $0.003 in 8.7s. Premium (Opus direct) answered at $0.080 in 45s. Same result, 27× cheaper.


Frequently asked questions

Does this work with Roo Code's tool use and MCP?
Yes. The API is OpenAI-compatible, so tool calling works exactly as it does with the direct API.

Will I lose context length?
For typical Roo Code sessions, no. Komilion applies smart compression for very long conversations — history above a threshold gets summarised rather than truncated. For most coding sessions you won't notice a difference. If you're working with extremely large codebases or very long multi-turn sessions, neo-mode/premium gives the highest per-request token budget.

What if I want Opus for every request?
Use neo-mode/premium as the model ID. Every request goes to Opus 4.6 directly.

Is this against Anthropic's ToS?
No. This is the official API path — pay-per-use, through OpenRouter's official channel. The enforcement was specifically about using subscription auth for automated access. API access was never restricted.


The broader picture

The January enforcement pushed a lot of developers off subscription auth and onto API auth. That's actually the correct architecture for automated tool access — you pay per request, you get reliable API semantics, and you're not sharing rate limits with your consumer Claude account.

If you've been on the subscription path this whole time, switching now puts you on a more stable foundation regardless of what Anthropic does with their consumer plans.


I'm the founder of Komilion. Happy to answer questions in the comments — especially if you hit a config issue with Roo Code's provider settings.

Migration guide: komilion.com/cline


Tags: vscode, ai, claude, roocode, devtools

Top comments (0)