Repository navigation
fix(core): unsigned agent commits, and caches for sandboxed workers - #19
Merged
Merged
Conversation
The machine's global git config signs commits, and its key is the owner's, so the agent's commits on the scratch repo carried the owner's signature: GitHub listed them as signed by a key unknown to pakgin-agent. A sandbox trial caught it, where signing failed outright because gpg couldn't reach ~/.gnupg. agentAccountEnvironment now sets commit.gpgsign and tag.gpgsign to false, which wins over any machine config, so the agent's commits are unsigned and its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sandbox trial on macOS: writes outside the worktree and network outside
the allowlist were refused, as meant, but npm install failed on its cache
in ~/.npm, which the sandbox doesn't let workers write. The session
starter now takes the sandbox as { cacheDirectory }, adds that directory
to the sandbox's writable paths, and points npm_config_cache,
XDG_CACHE_HOME, YARN_CACHE_FOLDER, and PIP_CACHE_DIR into it. The app
uses $SUPERAGENT_DATA_DIR/cache and creates it when the sandbox is on.
gh still can't verify TLS inside the sandbox on macOS (Go asks trustd,
which the sandbox blocks), so the docs say workers can't open pull
requests there yet; enableWeakerNetworkIsolation fixes it, at a cost the
roadmap's open decision weighs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pakgin
added a commit
that referenced
this pull request
Nov 9, 2026
The sandbox holds on macOS: writes outside the worktree and hosts off the allowlist were refused. Commits and npm installs failed until #19, which stops signing the agent's commits with the owner's key and gives package managers a cache the sandbox lets workers write. gh can't verify TLS inside it on macOS without enableWeakerNetworkIsolation, which open decision 2 now weighs, leaning toward turning it on there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; the previous documentation issue is fixed and no new issues were found.
|
Greptile on #19: the README still passed sandbox: true, which no longer typechecks. It now passes { cacheDirectory }, says what the sandbox writes, that the directory must exist, and the macOS gh limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
M2's sandbox trial, run on macOS with a real worker session through
createClaudeSessionStarter(the bot's own sandbox, guard, tool allowlist, and agent account) in a fresh worktree of the scratch repo. It found two bugs, fixed here, and one decision.pakgin-agent's commits on the scratch repo carried the owner's signature (GitHub: signed,unknown_key). This happened with or without the sandbox; inside it, signing failed outright.agentAccountEnvironmentnow setscommit.gpgsignandtag.gpgsignto false, which wins over the machine's config.npm installcouldn't write its cache in~/.npm. The sandbox is now{ cacheDirectory }: that directory is writable inside it, andnpm_config_cache,XDG_CACHE_HOME,YARN_CACHE_FOLDER, andPIP_CACHE_DIRpoint there. The app uses$SUPERAGENT_DATA_DIR/cache.ghcan't verify TLS inside the sandbox on macOS (Go askstrustd, which the sandbox blocks), so sandboxed workers can't open pull requests there. The docs say so.enableWeakerNetworkIsolationfixes it (tried:gh api userandgh pr listworked), at the cost the SDK warns of:trustdas a possible exfiltration path. It's the roadmap's open decision 2, left to the owner.The trial
touch ~/superagent-sandbox-probegit commitnpm install --no-save left-pad~/.npmgit ls-remote,git push --dry-rungh api usercurl https://example.comChecks
pnpm format,pnpm lint,pnpm typecheck, andpnpm testpass: core 434, agent 20.🤖 Generated with Claude Code