Skip to content

The fixed timeout of github_token from Github APP is blocking long-running jobs #716

@gameofby

Description

@gameofby

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?

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2Non-showstopper bug or popular feature requestperformanceprovider:vertexGCP Vertex API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions