File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/integrations/claude-code Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -191,9 +191,11 @@ function runProcess({
191191 process . env . CLAUDE_CODE_MAX_OUTPUT_TOKENS ||
192192 CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS . toString ( ) ,
193193 } ,
194- // Inherit the shell environment to ensure authentication tokens are available
194+ // IMPORTANT: These options are critical for Claude CLI authentication
195+ // extendEnv: true - Inherits parent process environment variables including ANTHROPIC_API_KEY
196+ // shell: true - Ensures proper environment variable expansion for authentication tokens
197+ // Without these, Claude CLI fails with "Invalid API key" even when properly authenticated
195198 extendEnv : true ,
196- // Use shell to ensure proper environment variable expansion
197199 shell : true ,
198200 cwd,
199201 maxBuffer : 1024 * 1024 * 1000 ,
You can’t perform that action at this time.
0 commit comments