[FEATURE] Cloud sessions/Routines: repo-scoped GitHub access without a user-level claude.ai<->GitHub account connection
Problem
Anthropic-cloud execution (claude.ai/code cloud sessions, Routines/scheduled runs) can only check out a repository through the claude.ai account's user-level GitHub OAuth connection. There is no way to grant the cloud runner access to one specific repository without linking an entire GitHub identity to claude.ai.
This is a real limiter for anyone who keeps separate GitHub accounts for separate contexts (personal / own-company / per-client — a common consultant setup). Concretely:
- My claude.ai account is OAuth-linked to GitHub account A.
- The repo I want a Routine to run against lives under my other GitHub account B.
- The Claude GitHub App is installed on account B with All repositories access — yet creating the routine still fails with
403 — "You don't have access to a repository this routine uses."because the user-level link is to account A. - The only fixes today are all account-level: re-link claude.ai to account B (over-broad — I don't want a user-level link at all), involve account A as a collaborator (crosses an identity boundary I keep deliberately), or abandon Anthropic-cloud execution entirely.
Local CLI users can express bounded, per-directory identities (gh auth multi-account, per-workspace credentials). The cloud has no equivalent.
Desired capability (any one of these would solve it)
- Repo-scoped grant: let a claude.ai cloud environment be granted specific repositories directly from a GitHub App installation, without binding a GitHub user identity to the claude.ai account.
- Per-environment credentials: accept a deploy key or fine-grained PAT as a cloud-environment setting, used only for checkout/push of the configured repo.
- CLI-established grant: let an authenticated local
claudeCLI (which already holds gh credentials for the right account) mint/authorize the cloud grant for a named repo.
Why it matters
Without this, users with identity boundaries must move scheduled agents off Anthropic's cloud (my workaround: GitHub Actions cron + claude setup-token), which costs the Routines UX and keeps subscription compute idle.
Related
- #84261 (connection silently binds to whichever GitHub account is active in the browser — same root: user-level binding)
- #15581, #62365 (closed multi-account feature requests — adjacent, but this ask is narrower: no user-level link, scoped repo grants)
- #75747, #68517 (closed bugs with the same 403 symptom despite owner-side app installs)