Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(sandbox): don't widen macOS child write scope to cwd

4 months ago

df0bdc0
Authored
Claude6/5/2026, 3:49:27 AM
Bugbot (commit 5eb57f3): buildSeatbeltCommand unconditionally added cwd as a
writable root, so a child agent scoped to narrower targetPaths could still write
across the whole workspace on macOS — diverging from the Linux bwrap backend,
which binds only the resolved writableRoots.

Remove the cwd parameter entirely; use exactly the resolved writableRoots (cwd
is already included for the non-targetPaths case) + the /tmp scratch family. This
also keeps the earlier unused-param lint satisfied. macOS and Linux write scope
now match.

Verified: bun run check, typecheck, sandbox + bash tests.

Parent5eb57f3

3 files changed
  • src/platform/sandbox/index.ts+1−1
  • src/platform/sandbox/seatbelt.ts+7−10
  • test/platform/sandbox.test.ts——