Repository navigation
feat: give a sandbox's GitHub token every repository the app is installed on - #18
Merged
OmarAlex24 merged 1 commit intoNov 11, 2026
Conversation
…lled on The token was minted for the sandbox's own repository only, so an agent working on a second repository got "Resource not accessible by integration". It now covers the installation's repositories, which the user picks on GitHub; the installation is still found through the sandbox's repository. The manifest also asks for workflows: write so a push that changes .github/workflows/ is accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OmarAlex24
merged this pull request
into
feat/sandbox-environments
Nov 11, 2026
8 of 20 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Each sandbox gets an hour-long GitHub App installation token, renewed by the host every 20 minutes. It was minted for the sandbox's own repository only (
repositories: [<repo>]). An agent that also works on another repository the app is installed on got 403 "Resource not accessible by integration" and could not push or open PRs. A push that changes.github/workflows/was refused too, because the app had no Workflows permission.Solution
Token scope.
createInstallationTokensends norepositoriesrestriction, so the token covers every repository the installation covers. The user picks those repositories in the installation's settings on GitHub.repository, which the renewal uses.Manifest. New apps ask for
workflows: "write". The description now says the token covers every repository the app is installed on.Settings text. The GitHub App row and the config form no longer say the token is for one repository.
Docs. A new "GitHub in a sandbox" section in
docs/user/remote-access.mdcovers:docs/internals/sandbox-environments.mdhas a matching note.Known limitations
Test plan
SandboxProvisioner.test.ts: the launch's and the renewal's mint requests carry norepositories, and the renewal keeps the record's repositoryworkflows: "write"SandboxAccessRows.browser.test.tsx9/9 andSandboxEnvironmentFields.browser.test.tsx23/23vp run check:changed origin/feat/sandbox-environmentson the top of this stack (feat/sandbox-agent-skill, which includes this branch): format, lint, knip, graphql, typecheck (38 packages) and React compiler pass. 818 of 819 tests pass; the one failure,sandboxSetup.test.ts > tailscaleScript > falls back to userspace, joins with the key as a 0600 file, and the scrub logs out, fails onfeat/sandbox-environmentstoo.🤖 Generated with Claude Code