Skip to content

Not logged in · Run /login - Claude Code / Codex

Quick fix

Turn CC Switch local proxy takeover on, check the API address includes /v1, or launch the terminal from CC Switch so env vars are injected.

Error output
Not logged in · Run /login

After configuring a third-party API in CC Switch, Claude Code or Codex still reporting that you are not logged in usually comes down to: 1. local proxy or route takeover not enabled, so requests never go through the CC Switch proxy; 2. environment variables not injected correctly when launching from an external terminal such as iTerm; 3. a wrong API address, missing the /v1 suffix for instance; 4. a network environment blocking the official login endpoint, or a regional restriction bug in a specific version such as v3.19.0 for Codex.

  1. Enable local proxy takeover: in CC Switch settings, open the proxy menu and turn on both the local proxy and the master proxy switch. If that does not work, turn the routing switch off, quit CC Switch completely, restart, and enable it again.

  2. Check the API config: in the advanced options of your custom config, add /v1 to the end of the API address, or enable the full-URL option and fill in the complete request endpoint.

  3. How you launch the terminal: if you use an external terminal such as iTerm, launch it by clicking 打开终端 (open terminal) in the CC Switch UI so environment variables are injected correctly.

  4. Enable TUN mode: if the error appears while adding something that needs an official login, such as GitHub Copilot, try switching your system proxy to TUN mode to complete the login.

  5. Roll the version back: if Codex login reports an unsupported country or region after updating to v3.19.0, downgrade to v3.18.0.

ToolClaude Code / Codex
Version3.13.0 - 3.19.0
PlatformsmacOSWindowsLinux
Claude Code says not logged in when launched from iTerm but works from a CC Switch terminal. Why?
Launching straight from an external terminal does not pick up the CC Switch environment variables and proxy configuration. Launch the terminal from the CC Switch UI.
I configured the API and skipped onboarding — why does it still ask me to log in?
Check the API address is correct: it usually needs /v1 on the end, or the full-URL option enabled in advanced options. Also make sure the CC Switch master local proxy switch is on.
Codex login reports an unsupported country or region after updating to v3.19.0. What now?
That is a known problem in v3.19.0. The stopgap is to downgrade to v3.18.0.

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.