1 month ago Anthropic released rather quickly there Github App and github action in response to Google Jules and OpenAI Codex. It allows to trigger a github action with "@claude" on issues or PRs and getting Claude Code to do the work and revert back in semi realtime.
It's all great but bad news for many Antropic subscribers (Claude Max / Claude Pro) it turns out that if they want to use @claude on their repo, they have to create a new API key and pay per tokens on top of their subscription.
Turns out the community of disapointed people by the above is quite big, so we gathered with the open-source community on github and created a fork of the claude github action enabling oauth support via a few github secrets that you would set on your repository and pass to the github action.
After a month and a lot of contributions, discussions and ideas we have improved the github action above by allowing to perform the full oauth flow within github indenpendently from the local Claude Code app. This solved all issue we had previously with oauth token expiring or invalidating the local oauth flow.
To give you an idea of what it took to achieve an oauth flow within github actions, we created a separate github action called claude code login. It runs in two steps the first one would store the oauth state in cache and generate the unique url to the anthropic website which generate the code. We then expect the user to go on the url, copy the code and re-run the same action. On the second run the user should provide the copied code. Using the cached state we perform the exchange code for token of the oauth flow and store the oauth tokens and expiry information in github secrets.
Additionally to the claude code login github action we check the expiry secret and refresh the tokens automatically (updating github secrets with a PAT) if expired or close to expire.
If you want to try for yourself, we have also released an installer which make it as simple as running one command in your repo to get started with @claude (if you are Claude subscriber):
# cd into your repo bash <(curl -fsSL https://raw.githubusercontent.com/grll/claude-code-action/main/scripts/installer.sh)
Let @claude solve all your github issues, and PRs at no extra cost...
repo: https://github.com/grll/claude-code-action
Hey, I have max plan 20x, I just wonder if Claude Code integrates with Github is only available via API? Like I see we can authorize access and install claude on our github and tag claude from @ to let it code directly in Github.
[UPDATE 2025-07-08]
Anthropic finally released this capability officially as part of claude code. You can uninstall everything previously installed via the installer with the new uninstaller:
# cd into your repo bash <(curl -fsSL https://raw.githubusercontent.com/grll/claude-code-action/main/scripts/uninstaller.sh)
Then follow the official instructions to setup the github action from claude code:
claude /install-github-app Set up Claude GitHub Actions for a repository use current repo │ A Claude workflow file already exists at .github/workflows/claude.yml │ │ What would you like to do? │ │ ❯ 1. Update workflow file with latest version 👈 │ > Create a long-lived token with your Claude subscription 👈 │ Enter a new API key
[ORIGINAL POST]
Hey there,
It's been more than a month that Anthropic released the integration of Claude Code with GitHub action using @claude on Github issues or PRs. Yet as of this time it is still not possible to use it with you Claude Pro / Max subscription unless you pay additionally per tokens for the use of that feature.
Few days after the release of @claude I made my own fork of the github action allowing anyone to use their subscription credentials with @claude. It's been quite successful but we also discovered a few issues with the setup.
Today I am releasing the biggest update of that fork so far. The key improvement that we worked on with the community was the handling of the authentication. We now properly support the full oauth flow from Anthropic independently from your local setup. This means we will refresh the tokens when they are expired (no more manual intervention every 8 hours) and we will not invalidate your local authentication flow.
Furthermore we also released and installer script that make it easier than ever to install @claude on your own repo. It's basically one command to run in your terminal:
# cd into your repo bash <(curl -fsSL https://raw.githubusercontent.com/grll/claude-code-action/main/scripts/installer.sh)
What are you waiting to start solving all your GitHub issues, opening and review PRs with Claude Code right from GitHub?
repo: https://github.com/grll/claude-code-action new release article: https://grll.bearblog.dev/major-update-for-pro-max-subscriber-using-claude-github-action/
EDIT 29.06.2025: 1 month has passed and we made it easier than ever to install @ claude on your own github repo in one command with the Claude Installer. Also we fixed tokens expiry issue, now you can keep using the same setup as long as you are a subscriber!
EDIT 04.06.2025: Anthropic released Claude Code for the Pro Plan ($20/month) so it now works for all paying users of Claude!!
So I already came here to say how disappointed I was to not be able to use my Claude Max Subscription with the new Github integration. I am already paying 100$/month and I have to create a pay per use key to use one of the key integration of Claude Code?
Anyway the community and "valued contributors" here told me that it was normal and that I was naive to assume that I would be able to use that subscription in CI/CD...
So guess what I made a fork of the Anthropic Github Action and now all of us can almost seamlessly use our Claude Max Subscription with the Anthropic Github App.
Here is how you do it:
Follow the official step to setup the Github App for your repository.
Make sure you are logged in locally in claude code with `/login` using your Claude Max Subscription.
Add CLAUDE_ACCESS_TOKEN, CLAUDE_REFRESH_TOKEN, CLAUDE_EXPIRES_AT secrets to your github repository. You will find the values for those in `~/.claude/.credentials.json` (on ubuntu), Or search "claude" in keychain on MacOS then "show password".
In your `workflow.yaml` instead of using the official `anthropic/claude-code-action` github action use the forked action: - name: Run Claude PR Action uses: grll/claude-code-action@beta with: use_oauth: true claude_access_token: ${{ secrets.CLAUDE_ACCESS_TOKEN }} claude_refresh_token: ${{ secrets.CLAUDE_REFRESH_TOKEN }} claude_expires_at: ${{ secrets.CLAUDE_EXPIRES_AT }}
Enjoy the Github App with your Claude Max subscription!
full breakdown of steps:
https://grll.bearblog.dev/use-claude-github-actions-with-claude-max/
Before it was API only, which could get very expensive.