# Machine policy

A machine's local policy decides what Andon may do on it. The board can ask for anything; the machine's policy is the last word. Change it on the machine with andon policy.

## Subcommands

- `permission-mode` (`plan | dontAsk | manual | acceptEdits | auto`): The most a run may use. A run that asks for more runs in this mode.
- `auto-merge` (`on | off`): Whether this machine merges a reviewed pull request when its team turns auto merge on. Off: reviewed PRs wait as "Ready to merge".
- `new-repos` (`on | off`): Whether runs may clone repositories and start new ones from a folder.
- `terminal-input` (`on | off`): Whether replies and decisions from the board are typed into this machine's sessions.
- `executors` (`claude,codex,gemini`): Which agent CLIs may run here. A run for another one fails with a policy error.
- `auto-update` (`on | off`): Whether the agent installs the board's signed build once a day. Off: update with `andon update`.

## Presets

`andon policy preset locked|standard|open` sets four keys at once and leaves every other key as it is.

| Preset     | `recipes.mode` | `allowAutoMerge` | `allowNewRepo` | `terminalInput` |
| ---------- | -------------- | ---------------- | -------------- | --------------- |
| `locked`   | `approve`      | `false`          | `false`        | `false`         |
| `standard` | `approve`      | `true`           | `true`         | `true`          |
| `open`     | `trust_org`    | `true`           | `true`         | `true`          |

## See the policy

**andon policy**

Prints each part of the policy as a row: ✓ allows, ~ limits, ✗ blocks, with the command that changes it.

**andon policy show**

Prints the whole `policy` object as JSON.

## On the machine

```sh title="shell"
# approve a recipe at its current hash
andon policy approve <recipe-slug>
```

> **Warning:** An edited recipe needs approving again.
>
> Standard and Locked pin each recipe to its hash, so an edited recipe needs `andon policy approve <slug>` on the machine.
