Permissions
Maxxing Code asks before it changes a file or runs a command, unless a mode or a rule says otherwise. Deny rules hold in every mode.
Modes
| Mode | Reads and searches | File edits | Commands | Web fetch, MCP tools |
|---|---|---|---|---|
default |
allowed | ask | ask (read-only commands allowed) | ask |
accept-edits |
allowed | allowed inside the project | ask | ask |
plan |
allowed | refused | refused (read-only allowed) | web fetch asks, MCP tools refused |
bypass |
allowed | allowed | allowed | allowed |
Switch with Shift+Tab (default, accept-edits, plan), /mode, --mode or the mode setting. bypass is never
one key press away: it takes /mode bypass, --mode bypass or the mode setting of your own settings file. The
status line always shows the current one.
Read-only commands are a short fixed list (ls, cat, grep, git status, git diff, git log, git branch…)
written without redirection, and without the options that make them write or run something else (sort -o,
uniq IN OUT, git branch -D, git diff --output, rg --pre, date -s…); anything else asks.
Paths are checked where the tools really go: ~/ is your home folder, and symbolic links are followed (a link
inside the project that points outside is outside for accept-edits and for the rules).
Plan mode: the agent can only read. It investigates, then presents a plan; you approve it (and choose whether edits will ask) or send it back with a comment. Nothing is changed before that.
Rules
Rules live in settings files under permissions:
{
"permissions": {
"allow": ["Bash(npm test:*)", "Bash(git commit:*)", "Edit(src/**)", "WebFetch(domain:docs.python.org)"],
"ask": ["Bash(git push:*)"],
"deny": ["Read(.env)", "Read(secrets/**)", "Bash(rm -rf:*)"]
}
}
| Rule | Matches |
|---|---|
Bash |
every command |
Bash(npm test:*) |
commands that are npm test or start with npm test |
Bash(git * main) |
* matches anything |
Read(.env) |
reading that file, at any depth (also covers grep and glob on it) |
Edit(src/**) |
writing or editing under src/ (Write(...) means the same) |
Read(/config/**), Read(~/.ssh/**), Read(//etc/**) |
relative to the project, to your home, absolute |
WebFetch(domain:example.com) |
that domain and its subdomains |
WebSearch, Task |
web searches, sub-agents |
mcp__server, mcp__server__tool |
every tool of an MCP server, or one |
Order: deny wins, then ask, then allow, then the mode.
A compound command (a && b, a | b, a; b) is allowed only when every part is allowed or read-only, and denied
as soon as one part is denied. A command that hides another one ($(...), backticks) is never allowed by a prefix
rule: it asks. Deny rules are read generously: Bash(git push:*) also refuses sudo git push,
env A=1 git push, echo $(git push) and bash -c "git push".
"Yes, and always allow…" in the terminal, and /permissions allow|deny RULE, save the rule for this folder (and
the folders below it) in your own folder, ~/.maxxing-code/rules/, not in the project: a repository cannot ship
it. A deny rule added with /permissions applies at once. /permissions shows the rules in force; --allow and
--deny add rules for one run.
Where rules come from
~/.maxxing-code/settings.json, the rules you accepted for the folder or one of its parents, then for every
folder from the root down to the working directory: .claude/settings.json, .claude/settings.local.json,
.maxxing/settings.json, .maxxing/settings.local.json. The lists add up.
A project's files can only make things stricter. Their deny and ask rules always apply; their allow rules
apply only once you have trusted the folder (the terminal asks once, showing them, like for its MCP servers).
They cannot set bypass, turn the sandbox off, declare providers or trustedFolders. The files in your home
folder itself (~/.claude/settings.json…) are yours: their allow rules apply everywhere.
Non-interactive runs
With -p and --json nobody can answer: what would ask is refused, and the agent is told why. Give it what it
needs up front: --mode accept-edits, --allow "Bash(npm test:*)", or --mode bypass in a disposable
environment.
Sandbox (Linux)
"sandbox": true runs every command of the bash tool inside bubblewrap:
the whole disk is read-only except the working directory and /tmp. The network stays available. It needs bwrap
installed; maxxing-code doctor tells whether it is. The sandbox covers commands, not the write and edit tools,
which follow the rules above.
What permissions are not
They are a guard against mistakes, not a security boundary against a hostile model or a hostile repository. For untrusted code, run Maxxing Code in a container or a virtual machine.
Files of a project that start programs (MCP servers declared in .mcp.json or in the project's settings) or that
allow things without asking (allow rules) are not used until you have trusted the folder, once, in the terminal.
Trusted folders are read from your own settings only.
Maxxing Code