[GitHub integration] **Title:** Cloud (Cowork) session: git proxy and GitHub API refuse a repository that is not in the "session's authorized repository set"; no `add_repo` tool exposed; connector reconnect does not fix it
Screenshot
_No response_
What were you trying to do?
From a Claude cloud/Cowork session, work on my own private repository tanj68/conviction-model-validation: read and post GitHub issue/PR comments via the REST API and push a branch, using a fine-grained PAT (Contents + Issues + Pull requests read/write on that repo).
Concretely:
GET https://api.github.com/repos/tanj68/conviction-model-validation/issues/24withAuthorization: Bearer <PAT>POSTa comment to the same issuegit push origin <sha>:refs/heads/vega/_probe(remote URL contains the PAT asx-access-token)
What happened instead?
All credentialed operations on the repository are refused by the session's proxy, not by GitHub, on every retry over ~45 minutes:
- API read (and metadata, and
POST /graphql) → HTTP 403 with a proxy-generated body:{"message":"GitHub access to this repository is not enabled for this session. Use add_repo to request access. If add_repo answers that read access is already available and you need GitHub API or write access, call add_repo again with access:"push" to attach the repository with credentials.","documentation_url":"https://docs.anthropic.com/en/docs/claude-code/github-actions"} git push --dry-run→ 403: remote: access denied by the git proxy: tanj68/conviction-model-validation is not in this session's authorized repository set, so the proxy will not inject a credential for it. To fix, add the repository to the session's sources.
fatal: unable to access 'https://github.com/tanj68/conviction-model-validation.git/': The requested URL returned error: 403
- The
add_repotool the message points to is not available in the session:ToolSearchforadd_repo/mcp__github__add_repo/enable__mcp__githubreturns "No matching deferred tools found".
Meanwhile, in the same session:
git cloneandgit ls-remoteof the same repo with the same PAT succeed (read-only git works).GET https://api.github.com/userwith the PAT → 200,login: tanj68— so the PAT is valid and reaches GitHub for non-repo endpoints.curl $HTTPS_PROXY/__agentproxy/status→enabled: true, selective: false, standalone: false, toolScoped: false, gitConfigInjection: true, gitSshRewrite: true, recentRelayFailures: []— no egress-policy denial recorded; the block is the per-session repository set.
Expected behavior
Either the repository is authorized for the session (it is my own repository and the GitHub connector is linked), or add_repo is exposed so the session can request access, as the proxy's own error text instructs.
Steps to reproduce
- Link the GitHub connector in claude.ai settings; start a cloud/Cowork session (mine is bound to a Project and linked to a Mac via the desktop app).
- In the session,
git clonea private repo you own using a valid fine-grained PAT (succeeds). - From the same session, run any credentialed API call under
/repos/<owner>/<repo>/…orgit push(fails as above). ToolSearchforadd_repo(not found).
What I already tried
- Generated a new fine-grained PAT (old one revoked):
/user→ 200, repo endpoints → same 403. Not the token. - Viewed the same session from the desktop app instead of the browser → no change.
- Disconnected and reconnected the GitHub connector in claude.ai settings, selecting the repository in the picker (per #78122 / #95832) → no change in the running session;
add_repostill absent. - This session was itself a new session, started after a previous session on the same day lost push/API access to the same repository mid-session (that earlier session had been posting to GitHub successfully before it stopped).
Environment
- Claude cloud/Cowork session started from the web app; later viewed from the macOS desktop app 2.2553.1.
- Session started 2026-09-22 ~12:49 CEST; bound to a claude.ai Project; linked Mac (device tools present).
- Container:
/home/claude, Python 3.11.15; outbound HTTPS via the agent proxy athttp://127.0.0.1:45779(HTTPS_PROXY), CA bundle/root/.ccr/ca-bundle.crt. - GitHub user:
tanj68(repository owner). Fine-grained PAT, scoped to the repo. - [previous session id / task link, if available]
Impact
Cloud sessions cannot post issue/PR comments or push branches to the user's own repository even with a valid PAT and a linked connector; all GitHub output has to be pasted manually.
Diagnostics
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗