You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading my Claude.ai subscription from Pro to Max, the claude-code-action@v1 consistently fails with Could not resolve authentication credentials from the Anthropic SDK's validateHeaders check, despite the OAuth token being passed correctly. The action receives the token (claude_code_oauth_token: *** visible in logs), OIDC exchange succeeds, GitHub App token is obtained, but the Claude Code subprocess fails immediately at SDK init with both apiKey and authToken null.
This appears to match the symptoms reported in #1126 ("oauthTokenFromFd:void 0, apiKeyFromFd:void 0") but specifically triggered by a Pro→Max plan upgrade rather than version regressions.
Behavior
Pre-Pro→Max upgrade: action worked reliably across many runs
Immediately post-upgrade: all runs fail with the same validateHeaders error
OIDC token successfully obtained
App token successfully obtained
Using GITHUB_TOKEN from OIDC
Successfully fetched issue #162 data
Source branch SHA: ...
... (prompt assembled, branch created) ...
Installing Claude Code v2.1.126...
✔ Claude Code successfully installed!
SDK execution error: 54 | new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
... validateHeaders ... throw Error('Could not resolve authentication credentials')
##[error]Action failed with error: SDK execution error: Error: Claude Code process exited with code 1
The apiKey and authToken are both null inside the new Anthropic({ apiKey, dangerouslyAllowBrowser: true }) call, despite CLAUDE_CODE_OAUTH_TOKEN being set in the env (visible in the action's input dump).
The exact same workflow file and secret value worked reliably for weeks pre-upgrade. After upgrading Pro→Max, the token gets reissued under a new organization context (claude auth status shows new orgId), and the action can no longer propagate it to the Claude Code subprocess. Only ANTHROPIC_API_KEY works as a workaround, but that defeats the purpose of OAuth for subscription users.
Happy to provide additional logs or try debug builds.
Describe the bug
After upgrading my Claude.ai subscription from Pro to Max, the
claude-code-action@v1consistently fails withCould not resolve authentication credentialsfrom the Anthropic SDK'svalidateHeaderscheck, despite the OAuth token being passed correctly. The action receives the token (claude_code_oauth_token: ***visible in logs), OIDC exchange succeeds, GitHub App token is obtained, but the Claude Code subprocess fails immediately at SDK init with bothapiKeyandauthTokennull.This appears to match the symptoms reported in #1126 ("oauthTokenFromFd:void 0, apiKeyFromFd:void 0") but specifically triggered by a Pro→Max plan upgrade rather than version regressions.
Behavior
validateHeaderserrorsk-ant-oat01-...fromclaude setup-tokenReproduction
claude setup-tokenCLAUDE_CODE_OAUTH_TOKENGitHub secret@claudecomment on an issueSDK execution error: Error: Claude Code process exited with code 1andCould not resolve authentication credentialsWhat I've tried
claude setup-token(alwayssk-ant-oat01-prefix)claude auth statusshows correct Max subscription locallywith:only (per CLAUDE_CODE_OAUTH_TOKEN is cleared between prepare and execute phases, causing authentication failure #676 advice)with:andenv:block as workaround~/.claude/.credentials.jsonwith token before action runs@v1→v1.0.111, SDK0.2.126, CLI2.1.126)Workflow config
Error excerpt
The
apiKeyandauthTokenare both null inside thenew Anthropic({ apiKey, dangerouslyAllowBrowser: true })call, despiteCLAUDE_CODE_OAUTH_TOKENbeing set in the env (visible in the action's input dump).Environment
ubuntu-24.04anthropics/claude-code-action@v1(SHAfefa07e9c665b7320f08c3b525980457f22f58aa)@anthropic-ai/claude-agent-sdk@0.2.1262.1.1261.3.6tag(issue_comment with@claude)Related issues
dangerouslyAllowBrowser/validateHeaderscrash (matches our error pattern exactly)CLAUDE_CODE_OAUTH_TOKENcleared between phasesvalidateHeadersin tag mode but not agent modeWhy this seems plan-related
The exact same workflow file and secret value worked reliably for weeks pre-upgrade. After upgrading Pro→Max, the token gets reissued under a new organization context (
claude auth statusshows neworgId), and the action can no longer propagate it to the Claude Code subprocess. OnlyANTHROPIC_API_KEYworks as a workaround, but that defeats the purpose of OAuth for subscription users.Happy to provide additional logs or try debug builds.