Skip to content

Support refresh tokens for Claude Max subscribers in GitHub Actions #727

@eversluis

Description

@eversluis

Problem

Claude Max subscribers cannot reliably use the GitHub Action with their subscription. The current OAuth flow produces tokens that expire in approximately 1 day, making it impractical for CI/CD use.

Current Situation

  1. The action supports claude_code_oauth_token as an alternative to anthropic_api_key
  2. Subscribers can extract OAuth tokens from ~/.claude/ after running /login
  3. These tokens expire quickly (~1 day)
  4. There is no claude_code_refresh_token input to automatically refresh expired tokens
  5. The /install-github-app command sets up tokens but they also expire quickly

Expected Behavior

Max subscribers should be able to use their subscription with GitHub Actions without:

  • Paying additional API costs
  • Manually refreshing tokens daily
  • Building custom refresh automation

Proposed Solutions

  1. Add refresh token support: Accept a claude_code_refresh_token input and automatically refresh the access token when expired
  2. Longer-lived tokens: Issue longer-lived OAuth tokens for CI/CD use cases
  3. GitHub App OAuth: The Claude GitHub App should handle authentication automatically for subscribers who have installed it and linked their account

Workaround

Currently the only reliable option is to use anthropic_api_key, which incurs additional costs beyond the Max subscription.

Environment

  • Claude Code version: 2.0.56
  • Using: Claude Max subscription
  • Action: anthropics/claude-code-action

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:installationenhancementNew feature or requestp2Non-showstopper bug or popular feature requestprovider:1pAnthropic First-Party API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions