Skip to content

Accept CLAUDE_CODE_OAUTH_TOKEN for the PR visual recap claude backend - #2764

Open
busbyk wants to merge 3 commits into
BuilderIO:mainfrom
busbyk:recap-claude-oauth-token
Open

Accept CLAUDE_CODE_OAUTH_TOKEN for the PR visual recap claude backend#2764
busbyk wants to merge 3 commits into
BuilderIO:mainfrom
busbyk:recap-claude-oauth-token

Conversation

@busbyk

@busbyk busbyk commented Aug 8, 2026

Copy link
Copy Markdown

Fixes #2741.

Summary

  • declare CLAUDE_CODE_OAUTH_TOKEN in the reusable workflow's workflow_call secrets, accept it in the gate as an alternative to ANTHROPIC_API_KEY, and pass it into both Claude Code invocations
  • carry the same alternative through the copy and fork workflows, the recap-cli gate twin, the caller template, and recap setup / recap doctor
  • document both auth paths in pr-visual-recap.mdx and the ten locale copies

Validation

  • end-to-end from a real consumer repo: NWACus/web run 31224973302 called this branch's reusable workflow passing only PLAN_RECAP_TOKEN and CLAUDE_CODE_OAUTH_TOKEN, with no ANTHROPIC_API_KEY in the secrets block. The gate logged Visual recap will run (claude)., the Opus agent step ran 783s authenticated by the subscription token, and the recap published: https://plan.agent-native.com/recaps/recap-8c80f6aa71f447f6
  • pnpm guards passed all 47 checks
  • pnpm --filter @agent-native/recap-cli typecheck passed
  • pnpm --filter @agent-native/recap-cli test passed 10/10, including new gate cases for OAuth-only and for neither credential configured
  • pnpm fmt:check clean
  • actionlint on the three recap workflows: no new findings versus main

Callers should set exactly one credential — with both configured the billing path is whichever the CLI prefers, so the secrets contract, the docs, and recap doctor all say so. A secret a caller leaves unset still reaches the step as an empty env var, so both invocation steps drop empty values before running the CLI. recapRequiredSecrets now returns interchangeable secret names rather than one name per backend; that is the breaking change behind the @agent-native/recap-cli minor bump. NWACus/web is ready to switch its caller to the subscription token once this merges.

busbyk added 2 commits August 7, 2026 12:15
…de backend

Reusable workflows can only receive secrets declared in their workflow_call
contract, so callers had no way to bill recaps to a Claude subscription even
though the Claude Code CLI already honors CLAUDE_CODE_OAUTH_TOKEN.

Declare the token as an optional secret, give the gate a presence-only signal
for it so the claude backend passes on either credential, and pass it into both
Claude Code invocations. Empty passthrough values are unset before the CLI runs
so an unconfigured secret is not mistaken for the chosen auth path.
…docs

The reusable workflow now accepts CLAUDE_CODE_OAUTH_TOKEN, so the copy and fork
workflows, the caller template recap setup writes, and the gate twin the CLI
evaluates all need the same alternative or they disagree about what a working
repo looks like — recap doctor would report ANTHROPIC_API_KEY missing on a repo
whose recaps run fine.

recapRequiredSecrets now returns interchangeable secret names rather than one
name per backend, so setup pushes whichever credential is available locally and
doctor accepts either, warning only when both are configured.
@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Visual recap — skipped

The visual recap job did not run for this pull request. This is informational only and does not block the PR.

Recap skipped for a4dd86b: external fork PR requires a maintainer to apply the recap label to the current head SHA.

builder-io-integration[bot]

This comment was marked as outdated.

…t shape

The core CLI re-exports @agent-native/recap-cli, and its spec still asserted the
flat string[] result and the old claude-backend gate message. Update both and
cover the OAuth-only gate path in the suite that actually gates CI.

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builder reviewed your changes — looks good ✅

Review Details

Incremental Code Review Summary

The latest commit updates the previously flagged core recap assertions and gate expectations to the new RecapSecretRequirement[] shape, so both prior review threads were verified as fixed and resolved. The OAuth credential is now consistently declared and propagated through the reusable, fork, copy, and generated caller workflows; the gate accepts either credential, empty secret values are removed before Claude Code runs, and setup/doctor/redaction behavior remains coherent. The added recap-cli tests pass, and the second independent review found no additional confirmed defects.

Risk level: High, because the change affects CI authentication and secret handling. No new actionable findings were identified in this incremental review.

🧪 Browser testing: Skipped — PR only modifies workflows, CLI/backend logic, tests, and documentation; there is no user-facing UI impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pr-visual-recap-reusable: support Claude Code subscription auth (CLAUDE_CODE_OAUTH_TOKEN) alongside ANTHROPIC_API_KEY

1 participant