From 4f5899b843823cb3444665e849aee64b99846645 Mon Sep 17 00:00:00 2001 From: claude Date: Tue, 29 Jul 2025 19:58:44 +0000 Subject: [PATCH] Fix anthropic_api_key parameter passed to claude-code-base-action Don't pass 'use-oauth' value to the base action when using OAuth authentication. This allows Claude Code to properly detect and use the OAuth credentials file instead of trying to use 'use-oauth' as an API key. --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9b7cc05..ec5c38c 100644 --- a/action.yml +++ b/action.yml @@ -124,7 +124,8 @@ runs: mcp_config: ${{ steps.prepare.outputs.mcp_config }} use_bedrock: ${{ inputs.use_bedrock }} use_vertex: ${{ inputs.use_vertex }} - anthropic_api_key: ${{ inputs.anthropic_api_key }} + # Don't pass anthropic_api_key when using OAuth + anthropic_api_key: ${{ inputs.anthropic_api_key != 'use-oauth' && inputs.anthropic_api_key || '' }} env: # Core configuration PROMPT_FILE: /tmp/claude-prompts/claude-prompt.txt