Cockpit
Permissions
ask, acceptEdits, auto and readOnly.
Every file edit and every command goes through one gate. The mode decides how much it asks.
The four modes
| Mode | Edits | Commands |
|---|---|---|
ask (default) | Show a diff and ask. | Ask, unless an allow rule matches. |
acceptEdits | Apply at once. Git is your undo. | Still ask. |
auto | Apply at once. | Routine test, build and lint commands run unasked, in a trusted folder only. |
readOnly | Not possible. | Not possible. The agent can only read and search. |
Shift+Tab cycles them, or type /permissions <mode>. permissions.defaultMode sets the starting mode. Only your user settings can make auto the default. A repository's own settings can only make the mode stricter.
What auto still asks about
Auto is narrow, and the docs call it narrow on purpose. It still asks, every time, in every mode, before changing a file that decides what runs later:
- Scripts, dependencies,
binentries and workspaces inpackage.json. Makefile, test and build configs,conftest.py,build.rs.- CI and editor task files:
.github,.vscode/tasks.json,.husky,.git/hooks,.devcontainer. - Agent folders such as
.claudeand.cursor, and rules files.
A version bump in package.json passes. It also asks, single use, never remembered, before it installs a package or runs a remote runner such as npx. Install and lifecycle scripts are switched off for every command the agent runs. Deny rules and secret files still refuse.
What auto does not cover: code the model writes itself and then runs. If the agent creates a new test file and then runs npm test, that new code runs with your permissions. Use auto only on code you would run anyway, and consider turning on the second opinion review. See Second opinions.
Rules
A rule is tool(pattern), where * matches anything.
| Rule | Allows or denies |
|---|---|
run_command(npm test*) | npm test, npm test -- --watch=false |
run_command(git status*) | git status, git status -s |
edit_file(src/**) | Edits to any file under src/ |
write_file | Any file creation or overwrite |
Checks run in this order: deny rules, then read only tools (always allowed), then allow rules and your "always" answers, then the mode.
By default Relief allows git status, git diff and git log, and denies git push, several spellings of recursive delete (rm -rf, del /s, rmdir /s, rd /s, format), and the PowerShell equivalents.
permissions.allow and permissions.deny accumulate across settings layers, so a project can add rules without erasing yours.
How commands are judged
- Allow rules never cover a chained command. A command with
&&,||,;,|,&, a redirect, a backtick,$(or a newline asks every time, in every mode. InreadOnlymode and in headless runs it is refused.git status && anythingdoes not ride on agit status*rule. Operators inside double quotes are harmless. - Deny rules look inside chains and disguises.
git pushis also stopped asgit status && git push,gi""t push,git -C . push,sudo git push,bash -c "git push"andcmd /c "git push". They are text guard rails, not a sandbox: a program that builds a command at runtime cannot be seen through, which is why nothing complex is pre-approved. - "Always" remembers the exact command, not a pattern.
- Deny rules guard reads too, for example
read_file(secret/**). - A command longer than 16,000 characters is refused. Put it in a script file.
The path jail
Every file tool resolves its path to the real location on disk first. Refused: .. escapes, absolute paths outside the project, and any symlink or junction that leads out, including a new file whose parent folder is a link. Secret filenames are judged by the typed name and the real name. On Windows, alternate data streams such as .env::$DATA, trailing dots or spaces and device names like con are refused.
Environment
A command the agent runs does not receive variables ending in _API_KEY, _TOKEN, _SECRET, _SECRET_KEY, _ACCESS_KEY, _PRIVATE_KEY, _PASSWORD or _CREDENTIAL, nor the key variables of your providers. If one command really needs one, name it in permissions.passEnv in your user settings. Even then its value is masked in anything sent back to the model.