Skip to content

Add local-project-setup.sh for cross-repo sandbox access - #39

Merged
technicalpickles merged 2 commits into
mainfrom
claude/unsandboxed-sessions-review-303862
Sep 14, 2026
Merged

technicalpickles merged 2 commits into
mainfrom
claude/unsandboxed-sessions-review-303862

Conversation

@technicalpickles

Copy link
Copy Markdown
Owner

Summary

  • Add local-project-setup.sh + claude/cross-repo-access.jsonc: grants a repo's Claude Code sessions filesystem access to sibling repos it routinely reaches into directly (e.g. pickleclaw running git/deploy commands against picklehome), via permissions.additionalDirectories in the target's gitignored .claude/settings.local.json. See ADR 0057 for the audit that motivated this (cross-repo git writes were the single biggest cause of dangerouslyDisableSandbox usage over a week of sessions).
  • Rename claude-project-setup.sh to cloud-project-setup.sh so the split is legible: cloud writes what a Claude Code web session needs (committed settings), local writes what only this machine needs (gitignored settings). ADR 0041 gets a short note pointing at the rename, decision unchanged.
  • Already run against pickleclaw and picklehome to fix the actual problem those repos were hitting.

Test plan

  • npm run lint passes.
  • ./local-project-setup.sh <dir> --dry-run verified against a repo with entries, a repo without, and --help.
  • pickleclaw/.claude/settings.local.json and picklehome/.claude/settings.local.json now carry permissions.additionalDirectories pointing at each other (and pickleclaw at openclaw-workspace).

technicalpickles and others added 2 commits September 14, 2026 09:47
…d-project-setup.sh

A cq audit of a week of unsandboxed Bash commands found cross-repo git
writes (a pickleclaw session cd-ing into picklehome, etc.) as the single
biggest cause of dangerouslyDisableSandbox usage: the sandbox only grants
write access to a session's own working directory, so a git command
against a sibling repo fails with Operation not permitted and falls back
to unsandboxed every time.

local-project-setup.sh writes permissions.additionalDirectories into a
repo's gitignored .claude/settings.local.json, driven by a new
claude/cross-repo-access.jsonc manifest. It's the local counterpart to
the existing claude-project-setup.sh, renamed to cloud-project-setup.sh
to make the split legible: cloud writes what a Claude Code web session
needs (must be committed), local writes what only this machine needs
(must not be). See ADR 0057, and the note added to ADR 0041.

Already run against pickleclaw and picklehome to fix the actual problem.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Got renamed via git mv but the internal --help/error text edits were
staged before the rename landed, so they never made it into the first
commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@technicalpickles
technicalpickles merged commit 0a3ea54 into main Sep 14, 2026
1 check passed
@technicalpickles
technicalpickles deleted the claude/unsandboxed-sessions-review-303862 branch September 14, 2026 13:52
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