Skip to content

Enforce staff sandbox boundary via PreToolUse hook#8

Merged
slifty merged 1 commit into
mainfrom
support_safe_writing
Jun 17, 2026
Merged

Enforce staff sandbox boundary via PreToolUse hook#8
slifty merged 1 commit into
mainfrom
support_safe_writing

Conversation

@slifty

@slifty slifty commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for writing files to a gitignored sandbox file.

This directory is ignored by git so it's safe to write to.

Resolves #7

Staff mode previously relied only on CLAUDE.md prose to keep writes
inside sandbox/; the harness still permitted Write, Edit, and Bash
anywhere, so the boundary was advisory. An earlier commit had removed
the mechanical PreToolUse gate in favor of instructions.

Reintroduce mechanical enforcement, but path-aware so staff can still
write reports to sandbox/. The sandbox-write-guard hook is a no-op in
developer mode; in staff mode it allows Write/Edit/NotebookEdit only
inside sandbox/ (resolving traversal and symlinks) and blocks Bash and
Agent outright. Document the enforcement in CLAUDE.md and README so the
sandbox boundary is no longer described as instruction-only.

Issue #7 {Support safe writing}
@slifty slifty merged commit fb5f8e0 into main Jun 17, 2026
2 checks passed
@slifty slifty deleted the support_safe_writing branch June 17, 2026 19:38
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.

Support safe writing

2 participants