Skip to content

fix: pass github_token to claude-code-action#253

Merged
kronosapiens merged 2 commits intomainfrom
fix/claude-review-github-token
Mar 18, 2026
Merged

fix: pass github_token to claude-code-action#253
kronosapiens merged 2 commits intomainfrom
fix/claude-review-github-token

Conversation

@kronosapiens
Copy link
Contributor

Summary

  • Pass github_token explicitly to claude-code-action to bypass the OIDC app token exchange that fails with "Invalid OIDC token"
  • This uses the workflow's automatic GITHUB_TOKEN which 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. Passing github_token skips that exchange entirely.

Test plan

🤖 Generated with Claude Code

kronosapiens and others added 2 commits March 18, 2026 12:55
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>
@kronosapiens kronosapiens merged commit 6b25990 into main Mar 18, 2026
1 of 2 checks passed
@kronosapiens kronosapiens deleted the fix/claude-review-github-token branch March 18, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant