# Set a machine's ceiling

The ceiling is the most any caller may do on one machine. It lives in a file on the machine, so a
change on your page cannot raise it.

**In short:** Edit `ceiling.json` in the machine's config folder, then restart the machine program. Check what
it enforces with `cmdop control ceiling.get`.

## When to use this

You want a machine to refuse whole risk classes, keep file tools inside some folders, cap what
agents and the page may do there, or allow the screen classes at all.

## Steps

1. Open the machine's config folder: `~/Library/Application Support/cmdop` on macOS,
   `~/.config/cmdop` on Linux, `%APPDATA%\cmdop` on Windows.
2. Create or edit `ceiling.json`. Pick the example closest to what you want:

   **Read and edit two folders**

Agents may look and edit under two folders, and never run commands:

       ```json
       { "risks": ["read", "write"], "roots": ["~/projects", "~/notes"] }
       ```

**Allow the screen**

The default classes plus seeing the screen and driving two apps:

       ```json
       {
         "risks": ["read", "write", "destructive", "exec", "network", "screen", "control"],
         "apps": { "allow": ["Safari", "Notes"] }
       }
       ```

**Cap agents only**

Clients you paired on this machine keep everything; MCP agents and the page may only look
       and run commands:

       ```json
       { "unpaired_risks": ["read", "exec"] }
       ```

   Without the file the machine allows `read`, `write`, `destructive`, `exec` and `network`, and
   no screen classes. Every key: [`ceiling.json`](https://docs.cmdop.ai/reference/config/ceiling-json.md).
3. Restart the machine program: quit and reopen the CMDOP app, or restart `cmdop run`. The file is
   read once, at start.

## Check

```bash
cmdop control ceiling.get
```

prints the classes, the classes for unpaired calls, the folders and the app lists the running
program enforces.

## If it fails

- The program stops at start with `ceiling: <path>: <error>`: the JSON is broken or a value is
  not a known class. Fix the file; the machine never falls back to a wider default.
- A key with a typo is ignored, and its default applies: compare `ceiling.get` with what you wrote.

## Related

[Grant risk classes](https://docs.cmdop.ai/guides/access/grant.md) · [Grants and the ceiling](https://docs.cmdop.ai/concepts/grants-and-ceiling.md) ·
[Pair a client](https://docs.cmdop.ai/reference/cli.md#cmdop-pair)
