fix: pass github_token to claude-code-action#253
Merged
kronosapiens merged 2 commits intomainfrom Mar 18, 2026
Merged
Conversation
The claude-code-action tries to exchange an OIDC token for a GitHub App token by default, which fails with "Invalid OIDC token" if the repo isn't registered with Anthropic's token exchange service. Passing github_token explicitly bypasses this and uses the workflow's automatic token instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github.token is the canonical way to reference the automatic token in action inputs. Both should work, but github.token is preferred. Note: pull_request_target runs the workflow from the base branch, so the previous run used main's workflow (without github_token), not this PR's version. This change can only be verified after merge. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github_tokenexplicitly toclaude-code-actionto bypass the OIDC app token exchange that fails with "Invalid OIDC token"GITHUB_TOKENwhich already has the required permissions (pull-requests: write)Context
Follow-up to #252. After switching to
pull_request_target, the OIDC token is now fetchable but the exchange with Anthropic's service fails because this repo isn't registered with it. Passinggithub_tokenskips that exchange entirely.Test plan
🤖 Generated with Claude Code