Skip to content

fix(ci): grant id-token: write to the Claude workflows - #16

Merged
prashar32 merged 1 commit into
mainfrom
fix/claude-workflow-oidc
May 30, 2026
Merged

fix(ci): grant id-token: write to the Claude workflows#16
prashar32 merged 1 commit into
mainfrom
fix/claude-workflow-oidc

Conversation

@prashar32

Copy link
Copy Markdown
Owner

The @claude run on PR #13 failed with:

Could not fetch an OIDC token. Did you remember to add id-token: write to your workflow permissions?

anthropics/claude-code-action authenticates to GitHub by minting a token via OIDC, which requires the id-token: write permission. Both Claude workflows were missing it (they had contents: read + pull-requests: write (+ issues: write)).

This adds id-token: write to claude.yml and claude-pr-review.yml.

After this merges

Because issue_comment workflows run from the default branch, the fix only takes effect once this is on main. Then post a fresh @claude comment to trigger a successful run. (Opening this PR may also exercise the auto-review path from the branch, which now has the permission.)

The claude-code-action authenticates to GitHub by minting a token via OIDC,
which needs `id-token: write`. Both workflows only had contents/pull-requests
(+issues), so the action failed with "Could not fetch an OIDC token. Did you
remember to add id-token: write to your workflow permissions?". Add it to
claude.yml and claude-pr-review.yml.
@prashar32
prashar32 merged commit d3ca745 into main May 30, 2026
4 of 5 checks passed
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