Skip to content

th-4d9ee1: sandbox posture for a personal assistant#241

Merged
brentrager merged 1 commit into
mainfrom
th-sandbox-personal
Jul 20, 2026
Merged

th-4d9ee1: sandbox posture for a personal assistant#241
brentrager merged 1 commit into
mainfrom
th-sandbox-personal

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Problem

The macOS Seatbelt profile confined writes to the workspace. That made Big Smooth ineffective as a personal assistant — it couldn't edit ~/.zshrc or anything under ~/.config, and in one session burned ~30 turns failing to place a poster file in ~/.config.

A path-based write jail can't distinguish "edit my shell rc" from "exfiltrate my SSH key". It only sees paths.

Change

Permit writes by default, and keep kernel denies only for guarantees that must hold unconditionally even against a fully-hijacked shell:

  • Credential stores~/.ssh, ~/.aws, ~/.config/gh, ~/.config/gcloud, ~/.kube, ~/.docker, ~/.gnupg, .netrc, ~/.smooth/auth, providers.json
  • ~/Library/LaunchAgents — a login agent written here would later execute outside the sandbox
  • .git/hooks + .git/config — execution re-entry

The git denies are path regexes, not workspace subpaths. Once writes are permitted broadly, a workspace-scoped deny would leave a hook plantable in every other checkout on the machine. Covered by a regression test that asserts the deny holds in an unrelated repo.

Intent-level judgement moves to the layers that can actually see intent: the engine DenyPolicy circuit-breakers (which no AutoMode can downgrade) and the Narc LLM judge.

Verification

  • cargo test -p smooai-smooth-tools105 passed, 0 failed
  • cargo fmt --check clean
  • The behavioural test flips with the posture: a benign $HOME write now succeeds, while a write under ~/.ssh is still kernel-denied (asserted by exit code and by the file's absence)

Note

This deliberately widens what the agent may write. It was directed and authorized by the repo owner after reviewing the tradeoff; the security posture shifts from path-jailing to behavioural gating rather than being removed.

Pearl: th-4d9ee1

🤖 Generated with Claude Code

User-authorized (2026-07-20): Brent explicitly directed this change and its
landing after reviewing the tradeoff.

The Seatbelt profile confined writes to the workspace, which made Big Smooth
ineffective as a personal assistant: it could not edit ~/.zshrc or ~/.config,
and burned ~30 turns failing to place a file in ~/.config.

A path-based write jail cannot tell a benign config edit from a harmful one --
it only sees paths. So the jail is replaced by permit-by-default plus targeted
denies for the guarantees that must hold unconditionally: credential stores,
~/Library/LaunchAgents, and .git/hooks + .git/config. The git denies are path
regexes rather than workspace subpaths, so they cover every checkout on the
machine.

Intent-level judgement moves to the behavioural layers: the engine DenyPolicy
circuit-breakers (which no AutoMode can downgrade) and the Narc LLM judge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZctFb4oiWoJraHN2db1nX
@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 12e1197

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager
brentrager merged commit 9509219 into main Jul 20, 2026
2 checks passed
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