[Cloud sessions] Regression between 2026-06-18 and 2026-06-25: GitHub REST passthrough returns 403 "GitHub access is not enabled for this session" for org repos despite Claude GitHub App installed

Status Open
Maintainer reply None cached
Activity 3 comments · opened Jul 3, 2026

Summary

Scheduled cloud routines (claude.ai/code triggers) that call the GitHub REST API directly (api.github.com/repos/<org>/...) worked every week from late April 2026 through Thursday 2026-06-18, then started failing on Thursday 2026-06-25 with a 403 emitted by the session's GitHub egress proxy:

{"message":"GitHub access is not enabled for this session. An org admin must connect the Claude GitHub App for this organization."}

Nothing changed on our side between those two dates (no changes to the routines' prompts, the cloud environment, or the GitHub org/app configuration). The Claude GitHub App is installed on the organization and has been for ~10 months.

Environment

  • Claude Code on the web, scheduled triggers (/v1/code/triggers), 5 routines across 5 repos of the <org> GitHub org
  • Cloud environment with the repo connected as a git source; git push and PR flows work fine
  • Claude GitHub App installed on the org since ~Sept 2025, All repositories, permissions: read access to commit statuses/members/metadata; read-write access to actions, checks, code, discussions, issues, pull requests, repository hooks, workflows. No pending permission requests.

What works vs what fails (inside a cloud session)

| Call | Result |
|---|---|
| git push to <org>/<repo> | ✅ works (proxy credential) |
| curl -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/<org>/<repo>/dependabot/alerts | ❌ 403 proxy message above (worked until 2026-06-18) |
| Same call with a user fine-grained PAT (security_events:read etc.) instead of the ambient token | ❌ same 403 — the proxy denies before considering the Authorization header |
| curl -H "Authorization: Bearer $GH_PAT" https://api.github.com/user | ✅ 200 (authenticated as the PAT owner) |
| curl https://registry.npmjs.org/ | ✅ 200 |

So the proxy selectively denies org-scoped REST paths (/repos/<org>/*) with an org-policy error, while non-org REST paths (/user, /rate_limit) pass through. The sandbox's /root/.ccr/README.md describes this as an egress-policy denial ("403/407 from the proxy: The destination host is not allowed by your organization's egress policy for this session").

Evidence of the regression window

Our routines create one PR per week per repo (branch security/YYYY-MM-DD, all created via POST /repos/.../pulls from inside cloud sessions):

  • repo-a: PRs on 04-30, 05-07, 05-14, 05-21, 06-04, 06-11, 06-18 ✅ — then none
  • repo-b: … 05-28, 06-04, 06-11, 06-18 ✅ — then none
  • repo-c: … 06-11, 06-18 ✅ — then none
  • repo-d, repo-e: same pattern

On 2026-06-25, all five runs aborted at preflight with the 403 above (transcripts available). Same on 2026-07-02/03.

What we tried (no effect)

  • Supplying our own fine-grained PAT via environment variables (works for /user, still 403 on /repos/<org>/*)
  • Reconnecting GitHub from claude.ai (no new authorization was requested)
  • Verifying the org's OAuth app policy (no Claude OAuth app exists to approve — the integration uses GitHub App user authorization)
  • Verifying the app installation for pending permission requests (none; permissions already include everything listed above)

Expected

Either the pre-June-25 behavior restored (org-scoped REST passthrough for sessions whose org has the Claude GitHub App installed), or documentation of what "connect the Claude GitHub App for this organization" concretely requires when the app is already installed — the error is not actionable as written.

Impact

Weekly automated Dependabot-triage routines across 5 repos are dead in the water; alerts are accumulating.

View original on GitHub ↗

3 Comments

pushkar232007 · 1 month ago

Also affected — git push to personal repos (not org repos) is also failing in cloud routine sessions with Permission denied to <username>.

Setup: 3 separate bots, each with its own fine-grained PAT (Contents: Read+write) set as GH_TOKEN in the cloud environment, pushing via git push https://${GH_TOKEN}@github.com/<username>/<repo>.git HEAD:main. All three worked fine until 2026-07-09, then started returning 403 on 2026-07-10. Regenerating the PAT had no effect, confirming the proxy is intercepting before the token is considered.

Impact: memory persistence is broken across all 3 automated trading bots — each routine run's state is lost when the container is reclaimed.

dubaxx · 1 month ago

Another affected case, with a tighter regression window and an outside-collaborator twist.

Setup: two scheduled cloud routines (claude.ai/code triggers, weekday cron 13:00 UTC) doing read-only GitHub REST (curl + my own classic PAT in a GH_TOKEN env var) against a private org repo. I'm an outside collaborator on that repo — not an org member — so the Claude GitHub App route was never available to me; direct REST with my own credential was the deliberate workaround. Worked daily for ~3 weeks.

Regression window (narrows OP's 06-18 → 06-25):

  • Last good run: 2026-06-23 (13:00 UTC).
  • First failed run: 2026-06-24/25. Symptom: GET /user → 200 (token authenticates fine), but repo root → 404, org repo list → empty, repo-qualified search → Validation Failed. That's GitHub answering as if the request were unauthenticated — consistent with the proxy stripping/ignoring the Authorization header on org-scoped paths (/repos/<org>/*) while passing /user through. Notably this made the failure look exactly like a GitHub-side org policy change; our org admin spent time investigating GitHub settings that had never changed.
  • Nothing changed on our side between the two runs: same prompt, same environment, same token, and the org admin confirms no GitHub org/policy changes.

Retried 2026-07-16: now the newer behavior from #76248 — every repo-scoped REST call returns 403 "GitHub access to this repository is not enabled for this session. Use add_repo to request access.", and a git-clone fallback is blocked by the network policy. Both a classic PAT and a gho_ OAuth token fail identically (both work fine from a local machine), confirming the proxy denies before any credential is evaluated.

The outside-collaborator dead end: add_repo isn't available in the session, the repo can't be added as a source because it never appears in the picker (no App installation on the org), and as an outside collaborator I cannot install the App or meaningfully request it. Per the OP, an App installation doesn't restore REST passthrough anyway. So for repos you have legitimate access to but whose org you don't belong to, there is currently no path at all from a cloud session — read-only included.

Would appreciate either (a) restoring credentialed passthrough for read-only REST to repos the supplied credential can access, or (b) a real mechanism for attaching a repo you can access without being a member of its org.

mattiasthalen · 9 hours ago

I started getting this exact issue last week. I can no longer use cloud sessions due to this.