/magpie-setup:isolated-setup-doctorfrom magpie-setup
Probes secure-agent sandbox restrictions blocking legitimate work: SSH agent, port binding, containers, scratch directory, signing key, gh, prek, uv, git hooks. Names troubleshooting entry and settings fix for each. Read-only.
Ships in magpie-setup. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Golden rule — a step the sandbox blocks becomes a vetted operation, never a bypass. This holds for the whole run. When anything you need to do fails on a sandbox restriction (a blocked host or transport, a read-only path, a denied credential or socket):
vetted-op-read, vetted-op,
vetted-op-tracker, vetted-op-git), launched with the literal ~ path.
Publishing a change is covered end to end by vetted-op-git:
git-worktree-add, git-fetch, git-stage, git-commit,
git-push-branch, git-pr-create. Run the checks in the sandbox first
with vetted-op-checks (git-commit refuses what they did not pass),
and never hand those steps to the user as commands to paste./magpie-setup:upstream-fix for it: a
closed-shape vetted operation (fixed argv, validated parameters, destination
from the approved policy, no repository code or configuration steering it,
behind a confirmation) or a documented in-sandbox route. Opening that PR
needs the user's go-ahead, like any other publication.Use the operator's explicitly requested runtime when supplied; otherwise use the active session's runtime. An installed executable or configuration directory alone does not select a runtime. For the routing below, treat that selection as the active harness.
When it is Codex, Antigravity, Goose, Pi or Copilot CLI, follow that harness's paragraph in runtime-routing.md.
When the harness is Claude Code, continue below. If the harness cannot be determined, ask once.
This is the diagnostic layer over the secure agent setup.
verify checks statically that the setup is installed right, catching drift and missing pieces.
This skill checks whether common workflows are functionally blocked by the sandbox as configured, catching over-restrictive allowlists.
(install puts the setup in place; update reports framework drift.)
Run verify first when the install itself is in doubt: fresh machine, recent upgrade, sandbox-state surprise.
Run doctor when the install is known good and a workflow fails in a sandbox-shaped way: agent unreachable, socket error, port permission error.
Every probe maps to a numbered entry in docs/setup/sandbox-troubleshooting.md.
The doctor identifies which entry applies now; it does not re-explain the remediation.
If a fail shows a failure mode not catalogued there, propose appending a new entry per the catalog's Adding a new entry section.
dangerouslyDisableSandbox, and never installs anything.
If a check fails, surface it and point at the catalog entry; do not auto-fix.docker / podman on PATH → docker probe ⊘, not ✗).Could not open a connection to your authentication agent" is./dev/null bind mount: stat -c '%F %t,%T' <path> prints character special file 1,3.
git status lists such placeholders as untracked (.bash_profile, .claude/settings.json, .mcp.json), and reading one returns nothing.
Take the host state from git (git ls-files <path>, git log -- <path>) or from a read the user runs outside the sandbox, and never delete the placeholder.docs/setup/sandbox-troubleshooting.md.
Do not paraphrase the remediation; the catalog is the single source of truth.The probes cover the catalog's failure modes that a sandboxed command can detect on its own; the signing entries that need a live touch or a terminal are verified by setup-isolated-setup-verify check 10 instead.
New probes are added when new entries land in the catalog, so the two stay in lock-step.
Tests whether ssh-agent is reachable from inside the sandbox.
Two failure modes:
SSH_AUTH_SOCK passes through claude-iso's env whitelist but the socket file is not in sandbox.filesystem.allowRead, so the agent's ssh / git push subprocesses cannot even stat(2) it;
or, on macOS, the file is readable but its path is missing from sandbox.network.allowUnixSockets, so connect(2) is denied and the agent looks unreachable while the socket is plainly there.
A signed commit hits the second as No private key found for public key.
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-1-ssh-agent.sh
On any result line other than ✓, read Probe 1 in probes.md for what it means before reporting it.
On ✗ → remediation:
docs/setup/sandbox-troubleshooting.md — SSH agent / Yubikey appears unreachable from inside the sandbox.
Tests whether a process inside the sandbox can bind to a loopback port AND then talk to itself over loopback.
The catalog documents the second half failing (egress proxy blocks 127.0.0.1).
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-2-localhost-bind.sh
On any result line other than ✓, read Probe 2 in probes.md for what it means before reporting it.
On ✗ → remediation:
docs/setup/sandbox-troubleshooting.md — Test cannot bind to a localhost port.
Tests whether the runtime CLI can talk to the container gateway, not the real daemon socket; the sandbox never gets a route to the daemon itself.
Run it for each of podman / docker on PATH; ⊘ each one not installed (an absent prerequisite, not a sandbox failure).
The remaining checks narrow down which of the three wiring pieces (env var, running gateway, allowed socket) is missing, in the order a fresh install would hit them.
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-3-container-gateway.sh
On any result line other than ✓, read Probe 3 in probes.md for what it means before reporting it.
An empty podman machine list from inside the sandbox is a read denial on the machine's directory, not proof that no machine exists.
Decide the machine's real state from outside the sandbox, per the catalog entry below.
On ✗ → remediation:
docs/setup/sandbox-troubleshooting.md — Docker / Podman command fails with a socket error.
TMPDIR)Tests whether the session has a writable scratch directory.
The sandbox mounts the host /tmp read-only and makes only specific subpaths writable, so a session whose TMPDIR falls back to /tmp has no scratch area at all.
TMPDIR landing on the shared session root rather than a per-project directory is not a finding.
Claude Code sets TMPDIR itself when it builds the sandbox, and that wins over env.TMPDIR from any settings file, so the shared root is expected and no configuration changes it.
Each session still gets a per-project, per-session scratchpad beneath it.
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-4-scratch-dir.sh
On any result line other than ✓, read Probe 4 in probes.md for what it means before reporting it.
On ✗ → remediation:
docs/setup/sandbox-troubleshooting.md — Temp files fail with "Read-only file system" under /tmp.
Do not propose env.TMPDIR in a settings file as the fix.
Claude Code overrides it when it builds the sandbox, so the setting is accepted and silently has no effect.
The giveaway is a directory that exists, is named exactly as configured, and stays empty.
The catalog entry above covers what is actually actionable.
gpg.format=ssh)Tests whether the public key git hands to ssh-keygen -Y sign can be opened from inside the sandbox.
Failure mode: the framework denies ~/.ssh/ wholesale, so with gpg.format=ssh every signed commit fails before the hardware key asks for a touch.
The touch overlay, which waits for ssh-keygen to block, never sees it block.
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-5-signing-key.sh
On any result line other than ✓, read Probe 5 in probes.md for what it means before reporting it.
On ✗ → remediation:
docs/setup/sandbox-troubleshooting.md — Signed commit fails before any touch when git signs with ssh
for the key, and
docs/setup/sandbox-troubleshooting.md — Signed commit fails with "cannot exec" of the touch-overlay wrapper
for the program.
gh runs outside the sandboxTests whether gh can reach GitHub from a sandboxed Bash call, and if not, whether the sandbox.excludedCommands: ["gh *"] exclusion the framework reference relies on is in place.
On macOS a sandboxed gh cannot verify TLS or read the keychain (x509: OSStatus -26276 / HTTP 401), so only the exclusion makes it work.
The exclusion applies only when every segment of a Bash invocation is cd … or gh ….
The probe deliberately runs gh through sh -c so the exclusion cannot apply to it, showing what an un-excluded gh does on this machine.
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-6-gh-outside-sandbox.sh
On any result line other than ✓, read Probe 6 in probes.md for what it means before reporting it.
Even with the exclusion present, a gh call is excluded only when every part of the Bash invocation is cd … or gh ….
A pipe, a $(…) substitution, a loop, or any file redirection (> file, even > /dev/null) puts it back in the sandbox.
The redirection case is a Claude Code regression tracked in anthropics/claude-code#95532; the catalog entry shows the gh tofile alias that works around it.
When the user reports a gh failure this probe does not reproduce, ask for the exact command line; the shape is usually the answer.
On ✗ → remediation:
docs/setup/sandbox-troubleshooting.md — gh fails with TLS OSStatus -26276 or HTTP 401 inside the sandbox.
prek and uv usable inside the sandboxTests whether the dev tools the framework's hooks and Python tools run on are found and can write their cache from a sandboxed Bash call.
They live in ~/.local/bin, which the harness reads only when the worktree's .claude/settings.local.json grants it; the committed project-scope entries are not applied.
Inside the sandbox a read-denied directory looks exactly like an absent one, so the probe reads settings.local.json to tell a missing grant from a tool that is not installed.
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-7-dev-tools.sh
On any result line other than ✓, read Probe 7 in probes.md for what it means before reporting it.
On ✗ or ⚠ → remediation:
docs/setup/sandbox-troubleshooting.md — prek or uv not found, or cannot write its cache, inside the sandbox.
Tests whether git run inside the sandbox can see the hooks a global core.hooksPath points at.
Git treats a hook it cannot see as one that does not exist, so an unreadable hook dir costs every hook — pre-commit and prek included — without an error.
Only a look from inside the sandbox shows it, which is where this probe runs.
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-8-git-hooks.sh
On any result line other than ✓, read Probe 8 in probes.md for what it means before reporting it.
On ✗ → remediation:
docs/setup/sandbox-troubleshooting.md — Git hooks silently skipped for commits made inside the sandbox.
Tests whether, with permissions.blockReadsOutsideWorkingDirectories on, the scratch root /tmp/claude-<uid> the skills read on every run is a working directory.
Without it nothing breaks, but each read there prompts, and a bulk sync multiplies that by its gatherer agents.
It also fails when $HOME/.claude/magpie (the fixed path the vetted-ops rules name) is one, read block or not: the sandbox makes working directories writable, and the vetted-ops commands run from there outside the sandbox.
The prompt comes before any command runs, so the sandbox-error hint hook never sees it; this probe is the only in-session pointer.
Where the vetted-ops dispatcher is used, a ✓ here is not enough: its commands spell ~ literally, which the read block cannot check, so every vetted-op-read call prompts while the block is on, and a background gatherer turns each prompt into a silent denial.
The setup requires the block off there (Read-only vetted ops never prompt); setup-isolated-setup-verify check 16 enforces it.
Command:
bash <framework>/plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-9-working-dirs.sh
On any result line other than ✓, read Probe 9 in probes.md for what it means before reporting it.
On ✗ or ⚠ → remediation:
docs/setup/sandbox-troubleshooting.md — Reads of ~/.claude/magpie or /tmp/claude-<uid> ask for approval every time.
If every probe is ✓ or ⊘:
All nine probes pass (or are not applicable). The sandbox is not currently blocking the known failure modes catalogued in
docs/setup/sandbox-troubleshooting.md. If you hit a different sandbox-shaped failure, follow the catalog's Adding a new entry section and (optionally) extend this skill with another probe so future runs catch the same shape automatically.
If any probe is ✗:
setup-isolated-setup-doctor to confirm the probe now passes.If a probe surfaces a fail shape not catalogued in
docs/setup/sandbox-troubleshooting.md:
When the troubleshooting catalogue grows an entry, add a matching probe:
scripts/README.md.
probes.md (opens in a new tab)runtime-routing.md (opens in a new tab)scripts/README.md (opens in a new tab)scripts/probe-1-ssh-agent.sh (opens in a new tab)scripts/probe-2-localhost-bind.sh (opens in a new tab)scripts/probe-3-container-gateway.sh (opens in a new tab)scripts/probe-4-scratch-dir.sh (opens in a new tab)scripts/probe-5-signing-key.sh (opens in a new tab)scripts/probe-6-gh-outside-sandbox.sh (opens in a new tab)scripts/probe-7-dev-tools.sh (opens in a new tab)scripts/probe-8-git-hooks.sh (opens in a new tab)scripts/probe-9-working-dirs.sh (opens in a new tab)tests/helpers.py (opens in a new tab)tests/test_probe_1_ssh_agent.py (opens in a new tab)tests/test_probe_3_container_gateway.py (opens in a new tab)tests/test_probe_5_signing_key.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
When the user says "doctor my sandbox", "why is the sandbox blocking X", or reports a failure that smells sandbox-shaped — agent unreachable, socket errors, permission errors on a port. Also worth running after an agent harness upgrade, since the sandbox profile moves.
Three short reads, in order
12 skills in this plugin
/isolated-setup-installWalk an adopter through the first-time install of the secure agent setup (sandbox, approval and clean-environment layers) for Claude Code, Codex, Antigravity, Pi or Goose. Interactive throughout; never runs sudo, edits a shell rc, or overwrites settings on its own./isolated-setup-updateReport drift between the installed secure setup and the framework's current one — checkout, pinned tools, user-scope script copies, denial commands, MCP checkouts. Read-only: it surfaces diffs and the user decides./isolated-setup-verifyCheck the secure agent setup against its checklist and report done, missing or partial for each item, with the evidence — paths, command output, versions. Covers Claude Code, Codex, Antigravity, Pi, Goose and Copilot CLI. Read-only.npx claudepluginhub apache/magpie --plugin magpie-setupOther plugins' skills for the same job