Skip to content

ci: restore id-token: write for the Claude review action - #9

Merged
jacobyoby merged 1 commit into
mainfrom
ci/restore-id-token
Sep 11, 2026
Merged

jacobyoby merged 1 commit into
mainfrom
ci/restore-id-token

Conversation

@jacobyoby

Copy link
Copy Markdown
Contributor

The Claude review step fails with Could not fetch an OIDC token (PR #8, run 34562301648). The action exchanges the job's OIDC token for a Claude GitHub App installation token, so id-token: write is required — the earlier comment saying it was unused was wrong.

The review will not run on this PR either: the action refuses to run when the workflow file differs from main. It will run on PR #8 once this merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_017RYiDstNPvrtMqDr3cEqY4

The action needs it to exchange the job's OIDC token for a Claude GitHub
App installation token. Without it the review step fails with
"Could not fetch an OIDC token" (PR #8 run 34562301648). The earlier
comment claiming the permission was unused was wrong.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RYiDstNPvrtMqDr3cEqY4
@jacobyoby
jacobyoby merged commit 09463c3 into main Sep 11, 2026
1 check passed
@jacobyoby
jacobyoby deleted the ci/restore-id-token branch September 11, 2026 04:42
jacobyoby added a commit that referenced this pull request Sep 11, 2026
* ci: add @claude on-demand alongside the automatic review

claude.yml runs Claude in tag mode: only when someone with write access
writes `@claude` in an issue, pull request comment or review. The job is
gated on the mention itself, so ordinary comments never start a runner, and
there is no `prompt` input — a prompt is what would turn this into an
every-event automation. It sits beside claude-code-review.yml rather than
replacing it; dropping the automatic review later is deleting one file.

`id-token: write` is included. I removed it from the review workflow earlier
as unused and #9 restored it — correctly: the action exchanges the workflow's
OIDC token to post as the Claude GitHub App, so tag mode needs it as well.

Skips green while ANTHROPIC_API_KEY is not visible to this repository.
Actions pinned to commit SHAs; the claude-code-action pin is the commit its
annotated v1 tag dereferences to, not the tag object.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VzsJf6bUyYZdq3kxJ8DGix

* ci: authenticate @claude with the Claude Code OAuth token

Follow #11: the review action now reads CLAUDE_CODE_OAUTH_TOKEN because the
API-key path needs a prepaid credit balance the org does not carry — the
first real review run on this PR failed after 435 ms with is_error:true and
zero cost. Use the same secret and the same skip-when-unset gate here so the
two workflows cannot drift apart on how they authenticate.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VzsJf6bUyYZdq3kxJ8DGix

---------

Co-authored-by: Claude <noreply@anthropic.com>
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