Skip to content

Claude Code subscription

Routeplane can adopt the Claude Code CLI’s live Pro or Max session under the dedicated claude-code provider. It does not copy the token into Routeplane; it stores a marker and reads the current Claude Code credential live.

**Claude Code traffic only.** The subscription provider requires the `anthropic-beta: claude-code-*` agent-profile marker sent by genuine Claude Code requests. It is not a general-purpose OpenAI-compatible endpoint. For ordinary Anthropic API traffic, configure the separate `anthropic` provider with `ANTHROPIC_API_KEY`.
Terminal window
routeplane providers login claude-code --label personal

If the Claude CLI already has a live session, Routeplane adopts it. Otherwise the command starts claude auth login --claudeai. Routeplane stores the non-secret session marker under $XDG_DATA_HOME/routeplane/oauth-tokens.json.

Terminal window
routeplane providers logout claude-code # removes every stored label for this provider
**A non-default label must be configured.** Auto-enable can discover that the provider exists, but routing without an explicit account list looks for the `default` label.

Add the chosen label to routeplane.yaml, then reload:

Terminal window
providers:
claude-code:
account_strategy: failover
accounts:
- label: personal
Terminal window
routeplane reload
**Labels are routing slots, not separate Claude profiles.** A `ClaudeCodeCli` marker reads the one live Claude Code session on the machine. Several labels that all use that marker still resolve to whichever Claude account the CLI is currently signed into. Independent seats require isolated Claude credential homes or separately stored OAuth credentials.

First verify that the daemon resolves the subscription route:

Terminal window
routeplane route claude-code:claude-sonnet-4-6

That proves routing configuration, not account capacity. Prove the real path with Claude Code itself:

Terminal window
routeplane spawn -a claude -- -p "Reply with one short sentence."

Check routeplane insight --since 10m for the provider and account label. A 429 proves the request reached the subscription provider but also proves that the account is currently capacity-blocked; only an ok record proves a usable turn.

  • Claude Code — point the Claude Code CLI at Routeplane.
  • Insight — inspect content-free local outcome records.
  • Models — the provider/model id scheme.