Not logged in ? Please run /login — Claude Code
Quick fix
Enable local proxy takeover for Claude Code, point ANTHROPIC_BASE_URL to http://127.0.0.1:15721, and set proxy-managed authentication placeholders.
Symptom
Section titled “Symptom”Not logged in ? Please run /loginWhen a managed-account provider such as Codex OAuth or GitHub Copilot is selected, requests bypass the local proxy if cc-switch writes the upstream address directly into the Claude Code configuration. Claude Code then cannot use the OAuth credentials managed and refreshed by cc-switch or perform the required protocol conversion, so it asks you to run `/login` before forwarding the request.
The same issue can appear differently: in 3.19.1, the provider card’s “Open Terminal” action generates a direct configuration without `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_API_KEY`, and it may report that the selected model does not exist or is inaccessible. Direct GitHub Copilot connections also previously had compatibility issues with the GPT-series Response API. A separate issue that incorrectly rewrites model statistics fields is a response-mapping failure, not the proxy-bypass issue described here.
Start the local proxy in cc-switch and enable proxy takeover for Claude Code.
Verify that Claude Code’s `~/.claude/settings.json` points to the cc-switch local proxy and includes proxy-managed authentication placeholders.
~/.claude/settings.json "ANTHROPIC_BASE_URL": "https://chatgpt.com/backend-api/codex","ANTHROPIC_BASE_URL": "http://127.0.0.1:15721","ANTHROPIC_AUTH_TOKEN": "PROXY_MANAGED",After switching to the target managed provider, run `claude` from a regular terminal. For Claude providers that depend on local routing, do not use the provider card’s “Open Terminal” action, which generates a direct configuration.
Check the cc-switch proxy logs. In successful cases, requests forwarded through the local proxy return HTTP 200.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 3 real issues
- The local proxy is already running. Why does Claude Code still ask me to run `/login`?
- Running the proxy process alone does not enable Claude Code takeover. If `~/.claude/settings.json` still points to the Codex or GitHub Copilot upstream address, requests bypass the local proxy. Change it to `http://127.0.0.1:15721` and add proxy-managed authentication placeholders.
- Why does the provider card’s “Open Terminal” action still report that the selected model does not exist or is inaccessible?
- The 3.19.1 reproduction shows that this action copies the provider’s direct environment configuration without checking whether the provider depends on local routing. It may therefore omit authentication fields and bypass the proxy. The temporary workaround in the thread is to enable Claude Code takeover, switch providers, and then run `claude` from a regular terminal.
- Would configuring this in opencode be better?
- A reply in the thread says that opencode officially supports this capability and does not require third-party protocol conversion. This differs from the Claude Code path, which requires protocol conversion through the cc-switch local proxy.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.