Skip to content

Claude Code: isolation probe ​

Two checks prove that a trial is isolated: the init probe on every run, and the isolation-probe suite on demand.

Init probe ​

The adapter reads the system/init event of every run.

In system/initVerdict
an undeclared MCP server or mcp__* tooltrial other, run killed at that event; a slash command may have started a background task just before (seen with /code-review)
an undeclared plugin (built-in plugins aside)same
a declared plugin that is missing, e.g. unreadable under srtsame
an MCP stub that is neither connected nor pending, or connected without a tool it declarestrial other, run killed at that event; stubs count as declared servers, and a pending stub is left to its own log after the run
a SessionStart hook started before init while the variant declares none and has no plugin (host managed settings?)same

system/init also lists skills and agents, but without telling built-in ones apart: the probe does not compare them. Hooks other than SessionStart emit no event before init.

The isolation-probe suite ​

sh
npx proctor run suites/isolation-probe.eval.ts --agent claude-code
npx proctor run suites/isolation-probe.eval.ts --agent claude-code --sandbox local-temp   # must fail: isolation degraded

suites/isolation-probe.eval.ts checks the isolation end to end with deterministic graders:

CriterionAgent commandExpected
workspace-writableecho … > probe.txt && cat probe.txtsucceeds: proof that Bash works
claude-config-unreadable, claude-settings-unreadablels -la ~/.claude, cat ~/.claude/settings.json (real host paths)fails with Operation not permitted
ssh-unreadablels -la ~/.sshsame
host-tmp-unreadablecat of a witness file that beforeAll writes next to the trial rootssame: it always exists, only the sandbox can block reading it
network-blockedcurl https://example.comfails
credential-not-in-envenvno trace of the credential or of the mask
credential-never-surfaced—the transcript contains neither an Anthropic key nor the mask: the token never reached the stream
no-claude-ai-connectorthe agent lists its mcp__* toolsno mcp__claude_ai_*
  • A denial must say Operation not permitted (or Permission denied). A missing file answers No such file with or without a sandbox, and made the probe pass under local-temp. Hence ls -la ~/.claude rather than cat ~/.claude/CLAUDE.md, which is missing on some machines.
  • On Linux, bubblewrap mounts an empty directory instead: No such file is accepted there.
  • Without the witness, a Bash tool that does not start at all would make every other criterion pass: it happened on the first real attempt.

Fingerprint of ~/.claude ​

A real campaign must change nothing in ~/.claude. Check it before and after, from a clone of this repo:

sh
npm run fingerprint:claude-home -- --save before.json
# … campaign …
npm run fingerprint:claude-home -- --compare before.json   # exits with 1 and lists what changed
Watched pathFingerprint
settings.json, plugins/known_marketplaces.jsonsha256 of the file
plugins/sha256 of the whole tree
missing"absent"

--home <dir> points somewhere other than ~/.claude.