Skip to content

Commit 24c8132

Browse files
committed
chore(auto-triage): use Claude Max OAuth token and Opus 4.7
Use `claude_code_oauth_token` instead of `anthropic_api_key` so we can leverage the Claude Max subscription (free under the OSS program) rather than paying per-token. Also switch the model to Opus 4.7, which is recommended for agentic coding and is available on Max. Generate the token locally with `claude setup-token`, then store as CLAUDE_CODE_OAUTH_TOKEN in GitHub repo secrets.
1 parent b0e9fbf commit 24c8132

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

.github/AUTO_TRIAGE.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,26 @@ post findings as a comment.
1414

1515
## Setup
1616

17-
### 1. Add the `ANTHROPIC_API_KEY` secret
17+
### 1. Add the `CLAUDE_CODE_OAUTH_TOKEN` secret
18+
19+
Uses Claude Max (free for the maintainer via Anthropic's OSS program) instead
20+
of a pay-per-use API key. Generate a long-lived OAuth token locally:
1821

1922
```bash
20-
gh secret set ANTHROPIC_API_KEY --repo nativewind/react-native-css --body "sk-ant-..."
23+
claude setup-token
2124
```
2225

26+
Then add it as a repo secret:
27+
28+
```bash
29+
gh secret set CLAUDE_CODE_OAUTH_TOKEN --repo nativewind/react-native-css
30+
# paste the token when prompted
31+
```
32+
33+
If the OSS Max subscription ever goes away, swap `claude_code_oauth_token` for
34+
`anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}` in the workflow and
35+
provide an API key instead.
36+
2337
### 2. Verify required labels exist
2438

2539
The workflow applies these labels. Confirm they exist:
@@ -61,11 +75,14 @@ active. Nothing more to do.
6175

6276
## Cost
6377

64-
Each Tier 1 run:
78+
Free under Claude Max (OSS program). Each run uses Opus 4.7 via OAuth.
79+
80+
Rate limits: Max has 5-hour session caps. If the triage workflow runs too
81+
frequently and hits a cap, subsequent runs will fail until the window resets.
82+
This is unlikely to be a problem given issue volume, but watch for it.
6583

66-
- Sonnet 4.6 at $3/M input, $15/M output
67-
- ~5-15 min of runtime on a free GitHub runner
68-
- Estimated ~$0.20-1.00 per issue depending on complexity
84+
If switched to API billing: Opus 4.7 is $5/M input, $25/M output. Estimate
85+
~$1-5 per issue.
6986

7087
## Troubleshooting
7188

.github/workflows/auto-triage.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ jobs:
6565
- name: Run Claude triage
6666
uses: anthropics/claude-code-base-action@beta
6767
with:
68-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
69-
model: claude-sonnet-4-6
68+
# Uses Claude Max subscription via OAuth token (free under OSS program).
69+
# Generate locally with `claude setup-token`, then set as repo secret.
70+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
71+
model: claude-opus-4-7
7072
max_turns: 30
7173
allowed_tools: "Bash,Read,Write,Edit,Glob,Grep"
7274
prompt: |

0 commit comments

Comments
 (0)