Skip to content

Install gh (GitHub CLI) in the default sandbox rootfs#463

Open
ZIJ wants to merge 1 commit into
mainfrom
fix/sandbox-gh-cli
Open

Install gh (GitHub CLI) in the default sandbox rootfs#463
ZIJ wants to merge 1 commit into
mainfrom
fix/sandbox-gh-cli

Conversation

@ZIJ

@ZIJ ZIJ commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Papercut: agents hit "cannot connect to github" — gh isn't available in the sandbox.

gh isn't in Ubuntu's default apt repos, so this adds GitHub's apt source (signed-by keyring fetched with curl, which the main package block already installs) and installs gh in a dedicated RUN, matching how rclone/nodesource are added. arch-agnostic via dpkg --print-architecture (amd64/arm64). Lands in Dockerfile.default — the image all agent sandboxes run on.

Validated by inspection against GitHub's documented install; the rootfs build runs in CI (scripts/build-rootfs.sh), not locally. Follow-up (optional): same block for the node/python/ubuntu templates if agents use them.

🤖 Generated with Claude Code

Agents 'cannot connect to github' because gh isn't in the sandbox. It's not in Ubuntu's
default repos, so add GitHub's apt source (signed-by keyring via curl, which the main apt
block installs) and install gh. The 'default' template is the image all agent sandboxes
run on. arch-agnostic (dpkg --print-architecture) for amd64/arm64 VMs.

Built/validated by scripts/build-rootfs.sh in CI (rootfs build isn't runnable locally).
Other templates (node/python/ubuntu) can get the same block if agents ever use them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant