Bug Description
When using claude_code_oauth_token with a token generated by claude setup-token (prefix sk-ant-oat01-*), the action fails with:
API Error: Header '14' has invalid value: '***'
The same token works correctly when used locally with claude -p.
Steps to Reproduce
- Generate OAuth token:
claude setup-token (Max 5x plan, sk-ant-oat01-* format)
- Store as GitHub secret
CLAUDE_CODE_OAUTH_TOKEN
- Configure workflow with
claude_code_oauth_token parameter
- Trigger via
@claude comment on a PR
Observed Behavior
The OIDC and app token exchange succeed, but Claude Code SDK fails:
OIDC token successfully obtained
App token successfully obtained
...
SDK execution error: Error: Claude Code returned an error result: API Error: Header '14' has invalid value
Also Tried
- Passing the same OAuth token via
anthropic_api_key parameter: Invalid API key error (expected, different code path)
- Token works locally:
ANTHROPIC_API_KEY=sk-ant-oat01-... claude -p "echo test" succeeds
Environment
- Plan: Max 5x
- Auth method: claude.ai (OAuth)
- Action version: v1 (SHA: 51ea8ea)
- Runner: ubuntu-latest (Ubuntu 24.04)
- Workflow permissions include id-token: write
- claude auth status locally shows: loggedIn: true, authMethod: claude.ai, subscriptionType: max
Bug Description
When using
claude_code_oauth_tokenwith a token generated byclaude setup-token(prefixsk-ant-oat01-*), the action fails with:The same token works correctly when used locally with
claude -p.Steps to Reproduce
claude setup-token(Max 5x plan,sk-ant-oat01-*format)CLAUDE_CODE_OAUTH_TOKENclaude_code_oauth_tokenparameter@claudecomment on a PRObserved Behavior
The OIDC and app token exchange succeed, but Claude Code SDK fails:
Also Tried
anthropic_api_keyparameter:Invalid API keyerror (expected, different code path)ANTHROPIC_API_KEY=sk-ant-oat01-... claude -p "echo test"succeedsEnvironment