Skip to content

Commit d08e814

Browse files
dkn16claude
andauthored
fix(permissions): move scratch edits from deny to ask in recommended … (#115)
…tier The recommended permission tier blanket-denied Edit(//scratch/**) and Edit(//pscratch/**), which made the agent unable to touch any file in projects rooted under $SCRATCH — exactly the layout NERSC users want because the home quota is small and DVS-mounted home doesn't honor flock(). The denies came from the Prism era when projects always lived under $HOME and scratch was just temp storage. Move both patterns from `deny` to `ask` so the agent has to prompt the user before writing into scratch (rather than being silently blocked), and add Write(//*scratch/**) to ask too — the original deny only covered Edit, leaving Write auto-allowed which was inconsistent. The other denies (~/.ssh, ~/.aws, ~/.gnupg, sudo, rm -rf, git push) remain — those are sensitive across all contexts. Verified by `lc init` on a project rooted in $SCRATCH: generated settings.json puts the four scratch patterns under "ask" while keeping the SSH/AWS/sudo guards under "deny". Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e4f0c10 commit d08e814

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/lightcone/cli/commands.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,22 @@
4141
},
4242
"recommended": {
4343
"allow": ["Read", "Edit", "Write", "Bash(*)", "WebSearch", "WebFetch"],
44+
# Patterns under "ask" prompt the user before the agent can act,
45+
# but don't block outright the way "deny" does. Use "ask" for
46+
# paths the agent legitimately *might* need to write to but
47+
# where a stray edit would be expensive — scratch filesystems
48+
# being the obvious case on HPC, where projects often live in
49+
# $SCRATCH and a careless edit could trash someone else's data.
50+
"ask": [
51+
"Edit(//scratch/**)",
52+
"Edit(//pscratch/**)",
53+
"Write(//scratch/**)",
54+
"Write(//pscratch/**)",
55+
],
4456
"deny": [
4557
"Edit(~/.ssh/**)",
4658
"Edit(~/.aws/**)",
4759
"Edit(~/.gnupg/**)",
48-
"Edit(//scratch/**)",
49-
"Edit(//pscratch/**)",
5060
"Bash(sudo *)",
5161
"Bash(rm -rf *)",
5262
"Bash(rm -fr *)",

0 commit comments

Comments
 (0)