Skip to content

fix: add id-token: write permission to claude.yml workflow#471

Merged
kimocoder merged 2 commits intomasterfrom
copilot/update-workflow-permissions
Mar 19, 2026
Merged

fix: add id-token: write permission to claude.yml workflow#471
kimocoder merged 2 commits intomasterfrom
copilot/update-workflow-permissions

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 19, 2026

The Claude Code workflow was failing with Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable because the job lacked the id-token: write permission required for OIDC token issuance.

Change

  • .github/workflows/claude.yml: Added id-token: write to the job-level permissions block
permissions:
  id-token: write   # added
  contents: write
  pull-requests: write
  issues: write
Original prompt

Update the workflow file .github/workflows/claude.yml to set workflow permissions and fix OIDC token retrieval failures. Add the following permissions section near the top of the file:

permissions:
id-token: write
contents: read

This solves the error 'Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable' in GitHub Actions jobs.

Keep existing workflow logic unchanged except for the added permissions.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The job failed because it couldn't fetch an OIDC token. The logs repeatedly show the error:

Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable

GitHub Actions recommends adding the following permissions to your workflow file to resolve this:

permissions:
  id-token: write
  contents: read

Solution:
Update your workflow file .github/workflows/claude.yml and ensure the permissions block includes id-token: write. For example:

name: Claude Code
on: [pull_request, push]

permissions:
  id-token: write
  contents: read

# ... rest of your workflow steps ...

This change will allow the job to retrieve the OIDC token and proceed successfully.

User: Make PR

Assistant: To create the pull request, I need to know which repository owner you'd like to use for kimocoder/wifite2. Can you confirm the repository owner is "kimocoder" or specify a different one?

User: Make PR

Assistant: The pull request to fix the OIDC token retrieval failure and add the required workflow permissions is being created in kimocoder/wifite2.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: kimocoder <4252297+kimocoder@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow file to set permissions and fix OIDC token errors fix: add id-token: write permission to claude.yml workflow Mar 19, 2026
Copilot AI requested a review from kimocoder March 19, 2026 03:34
@kimocoder kimocoder marked this pull request as ready for review March 19, 2026 03:35
Copilot AI review requested due to automatic review settings March 19, 2026 03:35
@kimocoder kimocoder merged commit 36627fb into master Mar 19, 2026
10 of 12 checks passed
@kimocoder kimocoder deleted the copilot/update-workflow-permissions branch March 19, 2026 03:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the missing GitHub Actions OIDC permission so the existing Claude workflow can successfully request an ACTIONS_ID_TOKEN_* token during execution.

Changes:

  • Add id-token: write to the claude job permissions in .github/workflows/claude.yml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 14 to 18
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
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.

3 participants