# Permissions

Permissions control whether an agent may take an action, such as run a command, edit a file or fetch a web page. A common setup asks before every `git push`, and never lets agents touch `.env` files.

<Screenshot
  shot="permissions/simple"
  alt="Organization Permissions in Simple view: Read files, Edit files, Run commands with Asks for 1 pattern, Fetch web pages and more, each with Allow, Ask and Deny"
  caption="Settings → Permissions, in Simple view."
/>

## Effects

| Effect    | Result                                                                                                                                    |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Allow** | The agent goes ahead.                                                                                                                     |
| **Ask**   | The agent stops and shows a [permission card](/docs/chats/#questions-and-permission-requests). Someone in the chat approves or denies it. |
| **Deny**  | The agent can't do it.                                                                                                                    |

## Levels

| Level        | Where                            |
| ------------ | -------------------------------- |
| Organization | **Settings → Permissions**       |
| Space        | The space's **Permissions** page |
| Agent        | The agent's page                 |

Ren checks every level, and the strictest answer wins: **Deny** over **Ask** over **Allow**. If the organization asks before `git push`, a space can't allow it without asking. Set what must hold everywhere in the organization, and tighten a space or an agent where its work needs it.

## Allow, ask or deny an action

In **Simple**, pick **Allow**, **Ask** or **Deny** next to an action. It applies to every use of that action.

## Rules for one command, file or website

To ask or deny only some uses of an action, select **Add rule**:

<Screenshot
  shot="permissions/add-rule"
  frame="detail"
  alt="The Add rule dialog with Run commands, the command git push *, and Ask first selected"
  caption="A rule that asks before every git push."
/>

<Steps>

1. Pick the action, such as **Run commands**, **Edit files** or **Fetch web pages**.
2. Type the pattern: a command, a file path or a URL.
3. Pick **Ask first** or **Never**, and select **Add rule**.

</Steps>

| Pattern      | Matches                                     |
| ------------ | ------------------------------------------- |
| `*`          | Any text, including `/`                     |
| `?`          | One character                               |
| `git push *` | Every `git push`, with or without arguments |
| `*.env`      | Every file that ends in `.env`              |

**Rules** lists the rules of the level. **JSON** shows them as JSON, to copy them to another space.

## Approvals

On a permission card, pick one of:

| Choice           | Result                                                       |
| ---------------- | ------------------------------------------------------------ |
| **Allow once**   | Approves this request only.                                  |
| **Always allow** | Approves it, and the same request for the rest of this chat. |
| **Deny**         | Refuses it.                                                  |

An approval never overrides **Deny**.

## Chats that nobody watches

A chat from an [automation](/docs/automations/) or a [channel](/docs/channels/) has nobody to approve a card, so **Ask** works like **Deny** there. Allow what that work needs in the space or the agent it runs as.

A [task](/docs/tasks/) chat is different: its card waits until someone answers it. The space's **Overview** shows the running chat under **Needs you**.

## Examples

| Goal                                  | Rule                                                |
| ------------------------------------- | --------------------------------------------------- |
| Review every push before it leaves    | **Run commands**, `git push *`, **Ask first**       |
| Keep agents out of production deploys | **Run commands**, `bun run deploy:prod*`, **Never** |
| Keep secrets files untouched          | **Edit files**, `*.env`, **Never**                  |
| A research space with no shell        | **Run commands**: **Deny** in the space             |