Skip to content

Claude Official leaves Claude Code in API Usage Billing mode #4200

Description

@ceilf6

Problem

After selecting Claude Official in cc-switch, launching Claude Code can still show API Usage Billing instead of using first-party Claude subscription / Remote Control auth.

A representative claude doctor output points to stale API auth still being active:

Remote Control requires claude.ai subscription auth. ANTHROPIC_AUTH_TOKEN is set, so this session is using API-key auth — unset it (or run in a shell without it) to use Remote Control.

This can happen even after /login succeeds because cc-switch can still leave API-specific Claude configuration in the active launch/config path.

Root Cause

There are two paths that should treat Claude Official differently from third-party Claude API providers:

  • The provider terminal launcher always uses provider-specific claude --settings <temp-config> settings, which can keep API auth active for the official provider.
  • Claude live settings writes do not remove stale API override values from an official provider record, so ANTHROPIC_*, apiBaseUrl, primaryModel, and smallFastModel can be written back into Claude's settings.

Expected Behavior

When the selected provider is Claude Official:

  • cc-switch should not inject provider-specific API settings into Claude Code.
  • stale API auth env vars should not keep Remote Control disabled.
  • official Claude settings such as permissions should still be preserved.
  • non-official Claude providers should continue to launch with provider-specific settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleNo activity, may be resolved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions