File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ async function loadClaudeSettingsEnv() {
115115/**
116116 * Checks Claude authentication credentials using two methods with priority order:
117117 *
118- * Priority 1: ANTHROPIC_API_KEY environment variable
118+ * Priority 1: ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN environment variables
119119 * Priority 1b: ~/.claude/settings.json env values
120120 * Priority 2: ~/.claude/.credentials.json OAuth tokens
121121 *
@@ -145,6 +145,14 @@ async function checkClaudeCredentials() {
145145 } ;
146146 }
147147
148+ if ( process . env . ANTHROPIC_AUTH_TOKEN && process . env . ANTHROPIC_AUTH_TOKEN . trim ( ) ) {
149+ return {
150+ authenticated : true ,
151+ email : 'Configured via environment' ,
152+ method : 'api_key'
153+ } ;
154+ }
155+
148156 // Priority 1b: Check ~/.claude/settings.json env values.
149157 // Claude Code can read proxy/auth values from settings.json even when the
150158 // CloudCLI server process itself was not started with those env vars exported.
You can’t perform that action at this time.
0 commit comments