Skip to content

Claude Code Action won't run due to "app token exchange" GitHub App installation token (HTTP 401 Unauthorized) #1206

@pcgeek86

Description

@pcgeek86

Describe the bug
When the Claude Code action runs, I get this error about using a GitHub App installation token.
I haven't modified the workflow, I just installed it with Claude Code's slash command.
I have an Anthropic API Key and tried to set it as a variable on the repository, but that didn't change anything.

Downloading a new version of Bun: https://github.com/oven-sh/bun/releases/download/bun-v1.3.6/bun-linux-x64.zip
/usr/bin/unzip -o -q /home/runner/work/_temp/ef1213db-5c6c-4ca7-9e57-f69aa0939743.zip
/home/runner/.bun/bin/bun --revision
1.3.6+d530ed993
Run cd ${GITHUB_ACTION_PATH}
bun install v1.3.6 (d530ed99)

+ @actions/core@1.11.1
+ @actions/github@6.0.1
+ @anthropic-ai/claude-agent-sdk@0.2.98
+ @modelcontextprotocol/sdk@1.16.0
+ @octokit/graphql@8.2.2
+ @octokit/rest@21.1.1
+ @octokit/webhooks-types@7.6.1
+ node-fetch@3.3.2
+ shell-quote@1.8.3
+ zod@3.25.76

163 packages installed [672.00ms]
Run bun --no-env-file \
Comment contains exact trigger phrase '@claude'
Auto-detected mode: tag for event: issue_comment
Requesting OIDC token...
Attempt 1 of 3...
OIDC token successfully obtained
Exchanging OIDC token for app token...
Attempt 1 of 3...
App token exchange failed: 401 Unauthorized - Failed to get GitHub App installation token
Attempt 1 failed: Failed to get GitHub App installation token
Retrying in 5 seconds...
Attempt 2 of 3...
App token exchange failed: 401 Unauthorized - Failed to get GitHub App installation token
Retrying in 10 seconds...
Attempt 2 failed: Failed to get GitHub App installation token
Attempt 3 of 3...
App token exchange failed: 401 Unauthorized - Failed to get GitHub App installation token
Attempt 3 failed: Failed to get GitHub App installation token
Operation failed after 3 attempts
Error: Action failed with error: Failed to get GitHub App installation token
Internal error: directory mismatch for directory "/home/runner/work/_actions/anthropics/claude-code-action/v1/tsconfig.json", fd 4. You don't need to do anything, but this indicates a bug.
Error: Process completed with exit code 1.
Run BUN_BIN="${GITHUB_ACTION_PATH}/bin/bun"
Internal error: directory mismatch for directory "/home/runner/work/_actions/anthropics/claude-code-action/v1/tsconfig.json", fd 4. You don't need to do anything, but this indicates a bug.
No buffered inline comments

To Reproduce

I used the built-in slash command in Claude Code to install the workflows into my GitHub repository, and it's enabled.

Expected behavior

Claude Code should run successfully in my GitHub Actions workflow.

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:installationbugSomething isn't workingp2Non-showstopper bug or popular feature request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions