feat(settings): drop Claude Code's sandbox #273

Merged
claudiomaradonna merged 3 commits from feat/remove-claude-sandbox into main 2026-12-02 23:29:32 +01:00
Collaborator

Why

The source's .claude/settings.json turns Claude Code's sandbox on in every adopted repository, but it isn't a security boundary. It is open to every host, Unix socket, and the home directory, and it runs Bash with no prompt in Manual and acceptEdits mode. The settings guide itself called it no defence against an instruction injected into what Claude reads.

The plugin forms for OpenCode, Claude Code, and Codex already ship without it. Its exclusion of the sandbox script could not match an installed plugin's path anyway. This brings the adopted form in line.

run-sandboxed.sh's bubblewrap sandbox, which isolates code from outside, stays.

What changed

  • Settings. .claude/settings.json loses its sandbox key; every other setting is unchanged. Bash commands now run under Claude Code's permission prompts. The Read rules on secret files stop only Claude's file tools and the file commands Claude Code recognizes, and no credential variable is unset.
  • Settings guide. docs/SANDBOX.md is deleted. What readers still need moves to docs/SETTINGS.md § Secret files:
    • the root-anchored twin rules;
    • git show for a committed example .env;
    • what stays readable without a sandbox;
    • a link to Claude Code's own sandboxing guide, for a developer who turns a sandbox on.
  • Skills. They stop relying on the removed exclusions:
    • run-sandboxed calls its script by its absolute path in the main checkout;
    • deliver's merge keeps its call form, now for the settings' ask rule on it;
    • the passages on how a sandbox the user turns on behaves (git's read-only config) stay.
  • Upgrade notes. UPGRADING.md replaces three sandbox notes with three notes:
    • Sandbox removal tells an adopter what the removal changes and leaves their sandbox to them.
    • Dropped permission rules keeps telling adopters from an older layout which permission rules the merge drops.
    • Secret file rules keeps telling the oldest adopters about the secret rules.

How to verify

Base main at d2e20ab, branch tip 3b345e7.

jq 'has("sandbox")' .claude/settings.json    # false
bash tests/agent-config/claude-settings.sh    # passes; on main the new assertion fails
git grep -n 'SANDBOX.md\|secrets-and-the-sandbox' -- '*.md'    # nothing

On the tip, outside a sandbox, all of these pass:

  • tests/verify-agent-config.sh, 426 tests;
  • tests/check-work-folder.sh, 46 tests;
  • ShellCheck, prettier, the static validator, and git diff --check main.

Considerations

  • An adopter who keeps their sandbox needs an excludedCommands entry for the sandbox script's absolute path. The upgrade note says so.
  • scripts/build-form.sh still strips sandbox from the Claude Code plugin's settings, because it builds earlier commits that hold the key.

https://claude.ai/code/session_012wUN2eKSj9s2vRHJdFPNk3

## Why The source's `.claude/settings.json` turns Claude Code's sandbox on in every adopted repository, but it isn't a security boundary. It is open to every host, Unix socket, and the home directory, and it runs Bash with no prompt in Manual and `acceptEdits` mode. The settings guide itself called it no defence against an instruction injected into what Claude reads. The plugin forms for OpenCode, Claude Code, and Codex already ship without it. Its exclusion of the sandbox script could not match an installed plugin's path anyway. This brings the adopted form in line. `run-sandboxed.sh`'s bubblewrap sandbox, which isolates code from outside, stays. ## What changed - **Settings.** `.claude/settings.json` loses its `sandbox` key; every other setting is unchanged. Bash commands now run under Claude Code's permission prompts. The `Read` rules on secret files stop only Claude's file tools and the file commands Claude Code recognizes, and no credential variable is unset. - **Settings guide.** `docs/SANDBOX.md` is deleted. What readers still need moves to `docs/SETTINGS.md` § Secret files: - the root-anchored twin rules; - `git show` for a committed example `.env`; - what stays readable without a sandbox; - a link to Claude Code's own sandboxing guide, for a developer who turns a sandbox on. - **Skills.** They stop relying on the removed exclusions: - `run-sandboxed` calls its script by its absolute path in the main checkout; - `deliver`'s merge keeps its call form, now for the settings' `ask` rule on it; - the passages on how a sandbox the user turns on behaves (git's read-only config) stay. - **Upgrade notes.** `UPGRADING.md` replaces three sandbox notes with three notes: - **Sandbox removal** tells an adopter what the removal changes and leaves their sandbox to them. - **Dropped permission rules** keeps telling adopters from an older layout which permission rules the merge drops. - **Secret file rules** keeps telling the oldest adopters about the secret rules. ## How to verify Base `main` at `d2e20ab`, branch tip `3b345e7`. ```sh jq 'has("sandbox")' .claude/settings.json # false bash tests/agent-config/claude-settings.sh # passes; on main the new assertion fails git grep -n 'SANDBOX.md\|secrets-and-the-sandbox' -- '*.md' # nothing ``` On the tip, outside a sandbox, all of these pass: - `tests/verify-agent-config.sh`, 426 tests; - `tests/check-work-folder.sh`, 46 tests; - ShellCheck, prettier, the static validator, and `git diff --check main`. ## Considerations - An adopter who keeps their sandbox needs an `excludedCommands` entry for the sandbox script's absolute path. The upgrade note says so. - `scripts/build-form.sh` still strips `sandbox` from the Claude Code plugin's settings, because it builds earlier commits that hold the key. https://claude.ai/code/session_012wUN2eKSj9s2vRHJdFPNk3
The adopted form's settings turned Claude Code's sandbox on for every
repository, open to every host and the home directory, with about
sixty credential variables unset. It gave no defence against an
injected instruction and its exclusions could not match an installed
script path, so the settings no longer set it. The tests check that
the file holds no sandbox key and keeps its other settings.
With Claude Code's sandbox gone from the settings, no exclusion runs
the sandbox script or the landing merge outside it, so the skills stop
prescribing the call forms those exclusions matched. The merge keeps
its form for the settings' ask rule on it.
docs: move the sandbox guide's facts to settings
Some checks failed
Maintenance / checks (pull_request) Successful in 9m0s
Maintenance / checks (push) Has been cancelled
Maintenance / publish (push) Has been cancelled
Maintenance / publish (pull_request) Has been skipped
3b345e73db
With Claude Code's sandbox gone from the settings, the guide to it
describes a setup the source no longer ships; what readers still need,
what the Read rules on secret files stop and leave readable, moves to
the settings guide. The upgrade notes tell an adopter what the removal
changes and keep telling older adopters about the rules a merge drops.
claudiomaradonna deleted branch feat/remove-claude-sandbox 2026-12-02 23:29:41 +01:00
First-time contributor

Command failed

The agent did not complete this command, so nothing came of it. A person should look at this thread.

The run failed at step "aoe_purge". The operator reads the job logs in the Windmill editor, or finds the run with: wmill job list --path f/agents/bot_commands

## Command failed The agent did not complete this command, so nothing came of it. A person should look at this thread. The run failed at step "aoe_purge". The operator reads the job logs in the Windmill editor, or finds the run with: `wmill job list --path f/agents/bot_commands`
Sign in to join this conversation.
No description provided.