> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool approvals

> Choose when Inlay asks before it acts, answer approval requests, and control which commands run without asking.

Approvals decide when Inlay stops and asks you before it acts. They're separate from [agent modes](/docs/core-concepts/modes.md), which decide what Inlay can do at all. **Manually approve** is the default and suits everyday work. Switch approval modes when you want more or fewer prompts.

## Choose an approval mode

Run the mode's command from the table below. In VS Code, you can also select the approval control beside the chat input, which shows the current mode as **Always ask**, **Manual**, or **Skip all**, and choose a mode from its menu. Each new chat starts in **Manually approve**.

| Mode | Command | When Inlay asks |
| - | - | - |
| **Always ask** | `/always-confirm` | Before every action, including file reads and starting a subagent. **Allow always** is unavailable. |
| **Manually approve** (default) | `/manual-confirm` | Before file edits and deletions, saving or removing [project memory](/docs/core-concepts/memory.md), shell commands that no rule allows, hardware actions such as flashing, starting a serial monitor, or sending serial commands, and anything that touches a path outside the project. Reads inside the project and [commands on the allowlist](#what-runs-without-asking) run without asking. |
| **Skip all approvals** | `/auto-confirm` | Only before it uploads local documents or schematics to the project. Everything else runs without pausing, including destructive or external actions. |

Switching to **Skip all approvals** also approves the requests already waiting, except document and schematic uploads.

> [!WARNING]
>
> **Skip all approvals** removes the prompts, not the limits. In every approval mode:
>
> * Plan mode limits still apply.
> * Inlay can't edit files protected by [.inlayignore](/docs/core-concepts/inlayignore.md).
> * Shell commands can't modify the project's `.git` folder.
>
> Inlay can also edit, create, and delete files outside the project folder. In **Manually approve** and **Always ask**, each of those changes asks first. In **Skip all approvals**, they run without asking. Changes outside the project aren't checkpointed, so `/undo` and `/rewind` can't revert them.
>
> Use it only for work whose scope you understand.

Setting a [goal](/docs/core-concepts/goals-and-loops.md) with `/goal` switches the chat to **Skip all approvals** while the goal is active.

## Respond to a request

The request card shows the action and the files, command, or hardware it affects. The card also shows how many other requests are waiting, for example **+2 waiting**.

| Choice | Key | Result |
| - | - | - |
| **Allow once** | `Y` | Runs this action. |
| **Allow always** | `A` | Runs this action and stops asking about the same kind of action, such as file edits or shell commands. See [What Allow always covers](#what-allow-always-covers). |
| **No, tell Inlay what to do instead** (VS Code) or **Do something else** (terminal UI) | `N` | Declines the action and stops the turn. Type what Inlay should do instead; your reply becomes the next instruction. |
| Reject | `Esc` | Declines the action and stops the turn without a reply. In VS Code, the first `Esc` opens the reply field; press `Esc` again with the field empty to reject. |

Declining also cancels the other requests waiting in the chat. In VS Code, you can also press `1`, `2`, or `3` to pick an option, or `Ctrl+Enter` (`⌘↩` on macOS) to allow once. In the terminal UI, press `F` to review a file change full screen.

If you don't answer a request within 10 minutes of its card appearing, it expires. Every request waiting behind it in the chat expires at the same time, including requests from subagents, so a turn doesn't stall for 10 minutes per queued request. An expired request counts as unanswered, not as a rejection: Inlay can try the action again later or continue with other work.

### Stop or decline mid-step

When you stop a turn or decline a request, Inlay records what became of each affected action, so its next turn doesn't assume that an edit or command went through:

| What happened | What Inlay records |
| - | - |
| You declined the action. | It didn't run. |
| The action was waiting for approval when you stopped the turn, or you declined another action from the same step. | It didn't run. |
| The action was running when you stopped the turn. | It may not have finished, so Inlay checks its effects before relying on them. |

A command that was running when you stopped it may have partly completed. If it was changing the board, such as a flash or a hardware script, check the board's state before you continue.

If you stop the turn or decline partway through a change-by-change review, Inlay restores the original file, including any changes you already accepted.

### Review an edit change by change

In VS Code, you can keep part of a proposed file edit:

1. Select the diff on the request card. The proposal opens in a review tab.
2. Select **Accept** or **Reject** on each change. You can also press `Alt+Y` or `Alt+N` (`⌥Y` or `⌥N` on macOS), and `Alt+↑` or `Alt+↓` to move between changes.
3. To decide the remaining changes at once, choose **Accept all** (`Ctrl+Enter`, or `⌘↩` on macOS) or **Reject all**.

Inlay writes only the changes you accept. The tab then shows how many were applied. If the file has unsaved changes in the editor, save it and ask Inlay for a fresh proposal.

In the terminal UI, press `R` on a file-edit request to review it block by block. Press `Y` or `N` to accept or reject the current block, `←` or `→` to move between blocks, and `Shift+Y` or `Shift+N` to accept or reject all the remaining blocks.

### What Allow always covers

* **Shell commands inside the project.** When Inlay can suggest a command rule, the option names it. In VS Code, its note reads, for example, **Saves west build to your allowlist**. In the terminal UI, the option reads **Save west build to allowlist**. The rule is added to your personal rules and applies to future chats in every project. Otherwise, the grant lets every shell command inside the project run without asking for the rest of the chat.
* **Commands that touch a path outside the project.** The grant covers only that exact command.
* **Reading files outside the project.** The grant covers that file or folder and everything under it, for the rest of the chat.
* **Editing, creating, or deleting files outside the project.** Not available. Each change outside the project gets its own card, and no earlier grant answers it. The card names the real location the change lands in, even when the path goes through a symbolic link inside the project.
* **File edits, hardware actions, and other requests.** The grant covers that kind of action for the rest of the chat. For example, allowing one file edit always also covers memory saves.
* **Subagents.** A chat's grant also covers every subagent started from that chat. A subagent's own grant doesn't apply to the main chat or to other subagents.
* **When it's unavailable.** You must approve document and schematic uploads each time, and **Allow always** is off while **Always ask** is on. In VS Code the option stays visible but dimmed, with the reason. In the terminal UI it's hidden.

Grants that last for the rest of the chat end when you stop a turn, decline a request, or start a new chat. Rules saved to your allowlist stay until you remove them.

## Approvals from subagents

Approval requests from the main chat and from every subagent it starts share one queue. Inlay shows the queue in the main chat one card at a time, in the order the requests arrive. A card from a subagent names the subagent that asked, and the subagent waits until you answer.

| To | VS Code | Terminal UI | Result |
| - | - | - | - |
| Allow this action | **Allow once** | **Allow once** | The subagent continues. |
| Allow it for this subagent | **Allow always**, marked **For this subagent, until it finishes** | **Always for this subagent** | Matching actions from that subagent run without asking until it finishes. |
| Decline with instructions | **No, tell the subagent what to do instead** | **No, tell the subagent what to do instead** | The request is refused, and the subagent continues with your reply. |
| Decline | `Esc` | `Esc` | The request is refused, and the subagent's current turn stops. |

Subagent requests expire like any other request. When the card on screen expires, every subagent request waiting behind it expires too.

If the card isn't in view when it arrives:

* In VS Code, if the chat holding the card isn't visible, a notification names who is asking and which chat. Choose **Open** to switch to it.
* In the terminal UI, the subagent's session shows **Approval needed in the main chat**. Press `↑` to return to the main chat and answer.

## What runs without asking

In **Manually approve** mode, a built-in allowlist of read-only commands runs without a prompt. The [What runs without asking](#manage-your-command-rules) panel lists every entry, grouped as follows:

| Group | Examples |
| - | - |
| **Move around and list files** | `ls -la`, `tree src`, `find . -name '*.c'`, `rg TODO src/` |
| **Read files and inspect binaries** | `cat src/main.c`, `head -50 build/output.map`, `readelf -h firmware.elf`, `size firmware.elf` |
| **Read system and device info** | `uname -a`, `lsusb`, `Get-Process` |
| **Read environment variables and tool locations** | `which arm-none-eabi-gcc`, `printenv PATH`, `env` |
| **Filter and format text** | `grep -rn TODO src/`, `wc -l src/*.c`, `sed -n '1,20p' file` |
| **Read-only version control and package queries** | `git status`, `git log --oneline -20`, `npm ls --depth=0` |
| **Build-tool help and dry runs** | `cmake --version`, `make -n`, `ninja -t targets` |
| **Toolchain and debug-probe queries** | `JLinkExe -?`, `probe-rs list`, `arm-none-eabi-gcc --version`, `west boards` |

The toolchain group covers version, help, and read-only device queries only. Builds, flashing, and erasing always ask unless you add a rule for them. Any command that touches a path outside the project asks, even when it's on the allowlist.

> [!NOTE]
>
> The **Read environment variables and tool locations** group can print secrets stored in environment variables. To make Inlay ask before those commands, turn them off in the panel.

## Manage your command rules

Use **What runs without asking** to control which commands and folders skip the prompt in **Manually approve** mode. Your rules are personal and apply to every project.

> [tab] VS Code
>
> 1. Run `/approvals`, or choose **Configure what runs without asking…** at the bottom of the approval menu. The panel opens on the **Commands** tab, with a banner that describes the current approval mode.
> 2. To check a command, type it under **Would this ask?**. The panel answers **runs** or **asks** and names the rule that decided. Nothing is executed.
> 3. To let a command run without asking, enter a command prefix under **Your rules** and select **Add**. Select **×** to remove a rule.
> 4. To make Inlay always ask before a built-in command, expand its group under **Built in** and turn the command's switch off. To make every built-in command ask, turn off **Let read-only commands run without asking**. Your own rules still apply.
> 5. On the **Paths** tab, add an SDK or toolchain directory under **Allowed outside the project**, such as `/opt/SEGGER`. Shell commands that touch that directory then stop asking for that reason. Allowing a directory doesn't also approve the commands that use it, and Inlay still asks before it reads files there directly.

> [tab] Terminal UI
>
> Run `/approvals`. The same rules open as one list, **What Runs Without Asking**.
>
> | Key | Action |
> | - | - |
> | `T` | Test whether a command would run or ask. Nothing is executed. |
> | `A` | Add a command rule. |
> | `P` | Add a directory outside the project. |
> | `D` | Remove the selected rule. |
> | `Enter` or `Space` | Switch the selected built-in command between **\[runs]** and **\[asks]**. |

Use narrow command prefixes. `west build` doesn't cover `west flash`, while `west` covers both. Each rule is one command, without shell operators such as `;`, `&`, `|`, `` ` ``, `$`, `>`, or `<`. A path rule must be an absolute path; your home folder and the filesystem root aren't accepted.

The rules apply only in **Manually approve** mode. **Would this ask?** doesn't account for **Allow always** grants in the current chat, and changing a rule doesn't revoke them.

Change your personal rules in `/approvals`, not by editing a file. `~/.inlay/approvals.json` is an older file that Inlay imports once; later edits to it have no effect.

## Review project requests

A repository can include `.inlay/approvals.json` to share approval rules with everyone who opens it. Because anyone can commit this file, it can only make approvals stricter. It can't grant itself new permissions.

```json theme={"theme":"css-variables"}
{
  "useBuiltinSafeCommands": true,
  "autoApprove": ["west build", "probe-rs list"],
  "neverAutoApprove": ["env"],
  "allowOutsideProject": ["/opt/SEGGER"]
}
```

| Field | Effect |
| - | - |
| `autoApprove` | Suggests commands that should run without asking. Nothing changes until you add them to your own rules. |
| `allowOutsideProject` | Suggests directories outside the project to allow. Nothing changes until you add them to your own rules. |
| `neverAutoApprove` | Makes these commands always ask, even when a built-in or personal rule would allow them. |
| `useBuiltinSafeCommands` | `false` makes the built-in read-only commands ask in this project; your own rules still apply. `true` doesn't override your own setting if you turned built-in commands off. |

Suggested commands and paths appear under **This project asks to auto-run** in `/approvals`. In VS Code, the list is on the **Commands** tab; select **Add to mine** to copy an entry into your personal rules. In the terminal UI, select an entry and press `Enter`.

If the project file contains an error, the **Files** tab in VS Code, or the **Files** section in the terminal UI, marks it **ignored** and shows the problem. Inlay applies nothing from an ignored file, so fix it before you rely on its rules.

## Keep the task specific

An approved command doesn't tell Inlay which board to flash or which files to change. State the target and the intended result in your request, especially when several devices or projects are open.

Use [.inlayignore](/docs/core-concepts/inlayignore.md) to protect files from direct agent edits in every approval mode.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.