# Permissions & safety

_What Monix Agent may do without asking, what it never does, and how to undo a change._

Monix Agent runs commands and writes files on your machine. What it
may do without asking is yours to set — and some things it refuses regardless.
Several independent layers apply, from the mode you choose down to the
operating system itself.

## The four modes

```
/mode
```

| Mode | What happens |
|---|---|---|
| Read only | It may read and search. No writes, no commands, and no
 plan to approve. The footer says *read only on*. |
| Accept edits | It edits files freely, but every command stops for
 you. The usual choice; the footer says *accept edits on*. The former
 *Ask* mode reads as Accept edits. |
| Auto | It works without asking; the confirm list (below), your
 *ask* rules and a safety check still stop it. The check runs on your
 machine without a language model: fixed rules let plain reading and building
 through, and anything they cannot judge goes to Laya, a small local
 classifier. When Laya is not sure a call is harmless, you are asked — it never
 refuses on its own. Writing outside the project and your working folders asks.
 Meant for runs nobody is watching. The footer says *auto mode on*. |
| Full | Nothing asks and there is no safety check; it reads and
 writes everything the two switches below allow. Rules do not run in Full.
 A confirm-list hit never asks there; the block list still refuses while
 *Stay in the project* is on, and is skipped with it off or with
 dangerous-skip on. Keys and tokens, Monix Agent's own settings and
 sending a message to another session stay protected. The footer says
 *full mode on*. |

**Plan** is a stop on the same Shift+Tab ring: it reads and
searches and proposes a plan, and writing starts when you approve it. The footer
says *plan mode on*.

**Stay in the project** (`stay_in_project`, Settings ▸
Path access) is a switch, not a mode. On, Full keeps to the project and the
folders you added as working folders; off, it reaches the whole computer. The page
also lists your folders (working or blocked) and the built-in system list that
stays readable in every mode.

**Full reads Monix data** (`full_reads_monix`, Settings ▸
Permissions) decides what Full may *read* of Monix Agent's own data: this
project's memory only (the default), or every project's memory and the session
registry. It can be set per project. Keys, tokens and backups stay unreadable and
nothing of it can be written. Only you can widen it. Other modes ignore it.

Shift + Tab in the chat
cycles Read only, Accept edits, Auto, Plan, Full; while a dialog is open it does
nothing. The mode is global unless you set it for this project or this session
(see [per project and per session](https://docs.nemonix.ai/monix-agent/docs/settings#scopes)); Shift+Tab then
changes that value. New installations start on Accept edits.

**Stay in the project** (`stay_in_project`, default
off). On, Full keeps to this project: writes outside it stay denied. Off, Full reaches
beyond the project. Set it under Settings ▸ Path access; like the
mode it can be set for a project or a session.

**Full reads Monix data** (`full_reads_monix`,
default *project*). What Full may *read* of Monix Agent's own data:
*project* is this project's memory only, *all* adds the session registry
and every project's memory. Keys, tokens and backups stay unreadable, and writing to
Monix data stays denied in both. Other modes ignore the setting. Only you can widen it
to *all*; an external agent cannot.

When the agent's plan is approved, it continues in the mode
you set under Settings ▸ General ▸ *After a plan is approved* — auto mode,
or accept edits with shell commands still asking. The plan question itself offers
yes (in Auto, or in Full when the plan came from Full), yes with confirmed edits,
and no, keep planning.

## Rules: allow, ask, deny

```
/permissions
```

Beyond the mode you can write rules for single tools. Three lists,
**allow**, **ask** and **deny**, checked
on every tool call. When more than one matches, the stricter wins:
**deny > ask > allow > the mode**. A broad allow can
therefore never cancel a narrow deny.

| Rule | Matches |
|---|---|---|
| `Bash` | Every shell command. |
| `Bash(npm *)` | Commands starting with `npm`. |
| `Bash(npm run test)` | Exactly this command. |
| `Read(**/.env)` | Reading or searching files matching the pattern. |
| `Edit(src/**)` | Changing files under `src`. |
| `WebFetch`, `WebSearch` | Fetching pages, searching the web. |

In the permissions page: a adds (you choose the
list), d removes (press it twice to confirm),
Enter on the mode line steps to the next mode. Rules
are set by you in this page — never by a command the agent runs.

## Block list and confirm list

Two more lists work on shell commands only, as patterns (regular
expressions), and have sensible built-in contents. You can add to them, remove
from them, and press R to return one to the built-in
version.

| List | Effect | Built in, for example |
|---|---|---|---|
| Block list | Refused without asking in every mode except Full
 with *Stay in the project* off or with dangerous-skip on, where the
 list is not checked. | Wiping a disk or formatting a
 filesystem, recursively deleting the root or your home folder, a fork bomb,
 shutting the machine down, changing permissions of the whole disk, removing
 core system packages. |
| Confirm list | Always asks, in every mode, and an entry on the
 allowed-commands list (below) does not silence it. Only *Dangerously skip
 all permissions* removes it. | Recursive
 delete or permission change that leaves the project, force-push, publishing
 to the npm registry, piping a download into a shell. |

## Saying yes once, for good

When a command stops for you, one of the answers is “allow this command from
now on”. That is remembered per project. See or edit the list:

```
/allow            # show it
/allow npm test   # add one
```

The same list is under Settings ▸ Project ▸ Allowed commands. An entry covers
that exact command and the same command with further arguments (`bun
test` also allows `bun test foo`), but never a command that
chains something on with `&&`, `;`, a pipe or
similar.

## The project boundary

How far the agent reaches follows the mode; *Stay in the project* is
the switch that decides whether Full stays bounded or reaches the whole computer.
In every mode it may *read* anywhere on the machine except keys, tokens and
Monix Agent's own data. It *writes* inside the project and in the folders you
marked *write*; anywhere else it asks, and the approval names the exact
path. Answering *never* marks the folder *blocked*. Shell commands are
checked against the same boundary. With **Full** and *Stay in the project*
off there is no project boundary; keys, tokens and Monix Agent's own data stay
protected.

Each project has **one folder list** (Settings ▸ Path access, or
`/paths`): every folder is *write*, *read only* or
*blocked*, and the most specific folder wins.

```
/paths                              # show the list
/paths write ../shared-library
/paths deny  ./infra/secrets
/paths remove ../shared-library
```

Earlier versions had more switches (read scope, project-only access, confine
shell, allow all paths) and per-session path limits. They are gone; values still
stored from those versions are ignored and listed under *Effective access*.

## What removes limits

Only **Full** with *Stay in the project*
off removes the boundary. Switching it on asks for a confirmation; turning the
switch back on restores the boundary at once.

| Mode | What it drops | What stays |
|---|---|---|---|
| Full, Stay in the project off | The project boundary for files and the shell, the folder
 list, the block list and every question. | Keys, tokens and Monix Agent's own
 data (sessions, memory, settings) stay unreadable or unwritable; asking before a
 message goes to another session stays. |

## The operating system enforces it

Everything above is a decision Monix Agent makes before a command runs. Because a
clever command can hide what it does, the shell of the agent is additionally
confined by the operating system, so a command that slips past every check is
still stopped by the kernel:

| System | Mechanism |
|---|---|---|
| Linux | Landlock. Needs kernel 5.13 or newer; without it Monix Agent
 says so and falls back to the checks above. |
| macOS | Seatbelt (`sandbox-exec`). |
| Windows | A process of low integrity level: it can read, but
 write only into your project and a private temporary folder. Everything in
 your user profile and the system stays read-only for it. |

The shell may write in your project and anywhere else that is not the
operating system's own territory. It cannot write into system folders, and it
cannot write into Monix Agent's own protected data (next section). Temporary files
and tool caches — for compilers, npm, uv, bun — are redirected to
`.monixcode/scratch/` in your project, so build tools work without
opening anything up. That folder is the *only* part of
`.monixcode/` the agent may write to.

## What the agent cannot touch

Your approvals only mean something if the agent cannot switch them off. So
Monix Agent's own settings, the project memory, hooks, MCP and plugin configuration
live in a protected data folder that the agent's shell cannot write to — the
operating system enforces that, not a rule the agent is asked to follow. The
agent can also not talk to Monix Agent's own server from its shell, and it can only
run the tools it was actually given for the mission. Commands that name
`.monixcode/` (other than `scratch`) are turned away before
they run.

Changing any of that is something *you* do, in the settings window or
the panels — never something a command in the agent's shell can do.

**Known limitation on Linux.** The agent's
shell cannot create, delete or rename *entries* directly in your home
folder — for example the lock file `git config --global` writes.
Existing files there stay writable. The same goes for the folders directly
above Monix Agent's protected data.

## What Monix Agent refuses, always

The block list from above is not a question but a refusal in every mode
except Full with *Stay in the project* off and when dangerous-skip
is on, where it is not checked.
Otherwise they do not ask, they do not run. If you know better
for your machine you can edit the list — but that is a decision only you can
make in the permissions page.

## Session roles

By default a session has today's behaviour and no extra reach over other
sessions. A *role* (`session_roles`, global, shared by all
projects) is a named set of capabilities that you assign to one session
(`session.role`); a session without a role is unchanged. Only you can
create roles or assign them. An agent can only ask: `request_role`
shows an approval card, and the role is set only if you approve it.

Other sessions: `read_sessions`, `message_sessions`,
`message_without_approval`, `steer_sessions`,
`stop_missions`, `kill_background_shells`,
`start_missions`. Own work, which a role can only narrow:
`spawn_subagents`, `create_schedules`,
`call_user`, `read_other_projects`. The scope is
`same_project` (default), `granted_sessions` or
`all_projects`. Approving questions, granting roles, reading secrets
and changing remote access are never capabilities. Presets: Orchestrator,
Reviewer.

## Getting back

Every file edit the agent makes can be undone: `/undo` reverts the
last step, `/redo` brings it back; a new edit clears what could be
redone. Both wait until no mission is running. Files that a step
*created* are left in place rather than deleted — removing something you
have since edited would be the worse mistake. What a shell command changed is
not covered by undo.

For work you want kept apart from your main tree entirely, give the session
its own git worktree — see [Sessions & projects](https://docs.nemonix.ai/monix-agent/docs/sessions#worktree).
