Repository navigation
Conversation
allozaur
added a commit
that referenced
this pull request
Nov 20, 2026
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
from
November 21, 2026 14:38
842dfe1 to
ea34ae3
Compare
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
2 times, most recently
from
November 24, 2026 06:56
7426943 to
e6cb5a4
Compare
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
from
November 24, 2026 08:28
e6cb5a4 to
4780626
Compare
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
from
November 24, 2026 09:40
4780626 to
41d998e
Compare
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
from
November 24, 2026 12:18
41d998e to
da1c665
Compare
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
from
November 24, 2026 13:57
da1c665 to
1fd5997
Compare
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
from
November 24, 2026 14:10
1fd5997 to
eb010f9
Compare
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
from
November 24, 2026 14:45
eb010f9 to
6461a83
Compare
…folders Tool permissions become rules kept in localStorage: allow, ask or deny, for a tool or a shell command pattern such as `npm run test *`, everywhere or in one working folder and the folders inside it. Deny beats ask beats allow. The tools allowed for good before turn into tool-wide allow rules on first load. exec_shell_command calls are split on && || ; | & and newlines, with quotes respected and harmless wrappers (timeout, time, nice, nohup, command) stripped. A command runs without asking only when every part is allowed; a deny or ask rule fires on any part. Substitution, subshells, open quotes and over-long commands are never allowed by a pattern. A short read-only allowlist needs no rule, and a hard floor (rm -r of / or ~, fork bombs, mkfs, raw disk writes) is refused in every mode. A permission mode in Settings > Tools decides what no rule does: ask, accept edits inside the working folder, read-only (tools llama-server marks as writing are refused, read-only shell commands still run), or auto-approve. It all runs in the harness's authorize: the prompt only shows for what the rules and the mode leave open. The prompt shows the command and an editable pattern for each part that needs approval, and can allow once, for this chat, always in the folder, always everywhere, or every tool of the server. Settings lists the kept rules and removes them; a tool a rule denies outright is no longer offered to the model. Assisted-by: Claude (Opus 5.5 Medium)
allozaur
force-pushed
the
allozaur/feat/permission-rules
branch
from
November 24, 2026 16:43
6461a83 to
55a54ca
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Tool permissions become rules: allow a shell command by its pattern, for this chat, in this folder or everywhere, and pick a permission mode for what no rule decides. Commands that could destroy the system are refused in every mode.
Additional information
Layer 3 of the planned stack, on #100 (harness hooks). Like #100, it goes between #55 and #61; inserting both into the stack and restacking #61 and above is still to do. The permission card was checked in Storybook; the settings list and the flow in the running app were not checked by hand.
What changed
{ tool, pattern?, effect: allow | ask | deny, cwd? }, kept in localStorage. Deny beats ask beats allow, whatever their order. A rule without a pattern covers every call of its tool; a pattern (npm run test *) covers shell commands; a folder limits a rule to calls made there and in folders inside it. The old "always allowed" tools turn into tool-wide allow rules on first load.exec_shell_commandcalls are split on&&,||,;,|,&and newlines (quotes respected,2>&1kept as a redirection), and harmless wrappers (timeout,time,nice,nohup,command) are stripped. A command runs without asking only when every part is allowed; a deny or ask rule fires on any part. Substitution, subshells, open quotes and over-long commands are never allowed by a pattern. A trailing*also matches the bare command, as in Claude Code.ls,cat,grep,findwithout-exec/-delete,git status/log/diff/show, …, without output redirection). A hard floor refusesrm -rof/or~, fork bombs,mkfsand raw disk writes in every mode, even with an allow-all rule.write_file/edit_fileinside the working folder); Read-only (refuses tools that can write, per/toolspermissions.write, except read-only shell commands); Auto-approve (everything no rule denies).<folder>, Always allow everywhere, Always allow all tools from the server (non-shell tools), Deny. A denial by a rule tells the model which rule.authorizefrom ui: give Llama Harness hooks to authorize tool calls and prepare each turn #100: the rules and the mode decide first, and the prompt only shows for what they leave open.Testing
ui/apps/chat:npm run check,npm run lintand the 887 unit tests pass, including the newpermission-rules.test.ts(shell splitting, patterns, precedence, folders, modes, the floor) andpermissions-store.test.ts(migration, rules for one chat, remembering edited patterns in a folder, a stopped run), andagentic-flow.test.tswith its denied-permission case.Requirements
Claude (Opus 5.5 Medium)