anthropics / anthropics/claude-code-action
The fixed timeout of github_token from Github APP is blocking long-running jobs
- Langage dominant
- TypeScript
- Étoiles
- 8.9k
- Forks
- 2.1k
- Merge moyen
- 3 j 9 h
- PR mergées (30 j)
- 10
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`: https://github.com/actions/create-github-app-token/issues/121#issuecomment-2027574184
- `Installation tokens expire one hour from the time you create them` from GHE Restful API doc: [Create an installation access token for an app](https://docs.github.com/en/enterprise-cloud@latest/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app), `actions/create-github-app-token` is 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:
1. Get github_token from `actions/create-github-app-token`.
2. Set input github_token from `${{ steps.app-token.outputs.token }}` above to run a long-running job with `anthropics/claude-code-action` for 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 the `github_token` has expired.
Example
```yaml
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:
```json
[
{
"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
- [x] GCP Vertex
**Additional context**
Add any other context about the problem here.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.