With ANTHROPIC_API_KEY also present in the environment, the claude CLI does API-key auth and ignores CLAUDE_CODE_OAUTH_TOKEN, failing with 401 Invalid API key when that key is invalid/out of credit. Strip it from the subprocess env so the subscription token is used; the api backend still reads it from os.environ.
30 KiB
30 KiB