-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Describe the bug
The github_token from actions/create-github-app-token has a fixed 1 hour timeout. It's blocking long-running jobs. Will claude-code-action support to refresh the access token during agent loop?
- Confirmation of fixed 1 hour timeout from
actions/create-github-app-token: Token seems to expire after 1h actions/create-github-app-token#121 (comment) Installation tokens expire one hour from the time you create themfrom GHE Restful API doc: Create an installation access token for an app,actions/create-github-app-tokenis using this API under the hood.
To Reproduce
Steps to reproduce the behavior:
As the Google Vertex AI workflow example from https://code.claude.com/docs/en/github-actions:
- Get github_token from
actions/create-github-app-token. - Set input github_token from
${{ steps.app-token.outputs.token }}above to run a long-running job withanthropics/claude-code-actionfor at least one hour.
After running time exceeds an hour and Claude Code invokes update_comment to sync progress to github comment, it fails on Bad Credencials because thegithub_tokenhas expired.
Example
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: anthropics/claude-code-action@v2
with:
github_token: ${{ steps.app-token.outputs.token }}Expected behavior
Claude Code Aciton is able to refresh github_token from Github APP during long-running agent loops, or any other workarounds that are able to bypass this timeout issue.
Screenshots
Logs when claude code invokes update_comment tool to update the progress in github issues comment:
[
{
"text": "Error: Bad credentials - https://docs.github.com/enterprise-server@3.15/rest"
}
]Workflow yml file
If it's not sensitive, consider including a paste of your full Claude workflow.yml file.
API Provider
- Anthropic First-Party API (default)
- AWS Bedrock
- GCP Vertex
Additional context
Add any other context about the problem here.