# Permissions
By default pic runs every tool call the model makes, as Pi does. A permission mode makes a
conversation stop and ask you first, or refuse changes altogether. The mode belongs to the
conversation: it survives a restart, and every terminal and phone sees the same one.
| Mode | Asks before | Refuses | Claude Code's nearest |
|---|---|---|---|
| `allow` | nothing | nothing | `bypassPermissions` |
| `ask-edits` | `write` and `edit` | nothing | none |
| `ask-all` | every call that can change something: commands, writes, edits, messages, MCP tools | nothing | `default` |
| `read-only` | nothing | every call that can change something | `plan` |
Reading, searching and listing (`read`, `grep`, `find`, `ls` and `tool_search`) never ask. `web_fetch` counts as a change, since its request leaves the
machine: `ask-all` asks before it and `read-only` refuses it. An MCP
tool counts as changing things, even when its server says it only reads, unless you name it in the
setting `readOnlyTools`: a comma list of MCP tool names, or whole servers as `mcp__SERVER__*`,
such as `pic settings readOnlyTools 'mcp__docs__*'`. A tool named there is treated as read-only in
every mode from its next call. It names MCP tools only: pic's own tools keep their kind, and any
other `*` (`*` alone, `mcp__do*`, `mcp____*`) names nothing. The wildcard stops at the first `__`,
so a server whose name contains `__` is listed by its own full `mcp__NAME__*`. The resource tools
(`list_mcp_resources`, `list_mcp_resource_templates`, `read_mcp_resource`) count as changes too:
one is read-only only when `readOnlyTools` names, as `mcp__SERVER__*`, the server it reads, or for
a listing of every server, each server with resources.
## Choosing a mode
- `/permissions` says the conversation's mode and the tools allowed for it; `/permissions ask-all`
changes it. Before the first message, the mode goes with that message. The footer names the mode
while it is not `allow`.
- `pic --permission-mode ask-all` gives the conversation that mode at its next message, in the
terminal interface, with `-p` and with `pic ask`.
- The setting `permissionMode` is the mode a new conversation starts with. A conversation that has
already run keeps its own.
- A paired phone shows each conversation's mode and can change it.
- In RPC mode, `get_permission_mode` and `set_permission_mode`.
## When a call asks
The call waits, and you get a [question](questions.md) in the terminal, on a paired phone and in
`pic answer`, titled with the tool and what it acts on ("Allow bash: make deploy?") and showing the
command, or the start of the file or the change. It has three answers:
- **Allow** runs this call.
- **Allow for this conversation** runs it, and that tool runs without asking for the rest of the
conversation.
- **Deny** does not run it. The model is told you denied it, and goes on.
The question is kept in the journal. If pic stops while it waits, the call has not run and the
question stays open: answer it, and the next pic to take up the conversation runs the call (or
not) on that answer, without asking again.
A hook can ask too: a PreToolUse hook that answers `"permissionDecision": "ask"` puts the call to
you this way in every mode, `allow` included, with the hook's reason above the preview.
A hook can also widen what a mode permits: a PreToolUse hook that answers `"allow"` runs the call
without the mode asking, as in Claude Code. Only `read-only` holds against it: a change is still
refused there. Configure only hooks you trust.
## With nobody there
A run with no terminal (`-p`, `pic run`, a loop firing) still waits: answer from a phone or with
`pic answer` in another shell. A question nobody answers closes after 7 days, as every question
does; the call is then denied, pic says so on stderr, and the model is told nobody answered.
A fork of a conversation, and a conversation rewound into a new branch, keep its mode and the tools
allowed for it.
## In read-only
A call that would change something is not run and not asked about, and a call already waiting is
refused if the mode becomes `read-only` before it is answered; the model is told the
conversation is read-only and to read, search and list only, or to ask you to change the mode.