# Troubleshooting

Find the symptom, then do what its row says. For an error code, see the second table.

**In short:** On the machine, `cmdop control status.get` names what blocks it in `blocking`. For a refused call,
act on the error code: [Errors](https://docs.cmdop.ai/reference/errors.md).

## By symptom

| You see | Check | Do |
|---|---|---|
| The machine is offline on the page | `cmdop control status.get` on the machine; exit code `2` means the program is not running | Start it: `cmdop run`, or open the CMDOP app |
| `status.get` shows the link `refused` | the machine's key is not admitted to the contour | Send the output of `cmdop key` to the CMDOP team |
| `status.get` shows the link `failed` | `server` in `machine.json` | `cmdop config set server wss://<contour>.cmdop.ai/ws/machine`, then restart |
| The program stops at start with `ceiling: …` | `ceiling.json` | Fix the JSON or the class name the message points at ([`ceiling.json`](https://docs.cmdop.ai/reference/config/ceiling-json.md)) |
| The program stops at start naming `machine.json` | a key with a typo | Fix it, or `cmdop config migrate` for an old file |
| A command on a release build says the terms were not accepted | no terminal to ask | Run it once in a terminal, or set [`CMDOP_ACCEPT_AGREEMENT`](https://docs.cmdop.ai/reference/config/environment.md) |
| An MCP client shows no CMDOP tools | the client's MCP settings and the token | Set it up again from [Connect an agent](https://docs.cmdop.ai/guides/connect.md); a revoked token gets `unauthorized` |
| An agent sees the machine but every change is refused | the agent's grant | A new agent has `read` only: [grant risk classes](https://docs.cmdop.ai/guides/access/grant.md) |
| File tools refuse a folder the grant allows | `cmdop control ceiling.get` → `roots`, and the [folders no tool reaches](https://docs.cmdop.ai/guides/files.md#what-the-file-tools-never-reach) | Add the folder to `roots`, then restart |
| Screen tools are missing or refused | `screen_info`: permissions and pause | [See and control the screen](https://docs.cmdop.ai/guides/screen.md): grant, ceiling, OS permissions |
| A task is gone after a while | whether the machine program restarted | A restart stops tasks; start it again and keep long work in tasks you can restart |
| A screenshot is black | `screen_info` → `locked` | Unlock the machine; a secure input field also comes back black |

## By error code

| Code | Meaning | Do |
|---|---|---|
| [`unauthorized`](https://docs.cmdop.ai/reference/errors/unauthorized.md) | the token is wrong, revoked or of another contour | Use the right token; a revoked agent is connected again as a new one |
| [`denied`](https://docs.cmdop.ai/reference/errors/denied.md) | the grant or the ceiling does not allow the class, folder or app | The owner widens the grant or the ceiling; do not retry |
| [`paused`](https://docs.cmdop.ai/reference/errors/paused.md) | the owner paused the machine | Resume at the machine ([pause](https://docs.cmdop.ai/guides/pause-and-presence.md)) |
| [`needs_presence`](https://docs.cmdop.ai/reference/errors/needs_presence.md) | the change needs a person at the machine | Confirm in the CMDOP app with Touch ID or the password |
| [`busy`](https://docs.cmdop.ai/reference/errors/busy.md) | 8 calls already run there | Wait and retry |
| [`rate_limited`](https://docs.cmdop.ai/reference/errors/rate_limited.md) | more than 120 input actions this minute | Slow down |
| [`timed_out`](https://docs.cmdop.ai/reference/errors/timed_out.md) | the call took longer than its tool's limit | Use a [task](https://docs.cmdop.ai/guides/run.md#start-a-long-task) for long work |
| [`too_large`](https://docs.cmdop.ai/reference/errors/too_large.md) | arguments or result over 16 MiB | Read in parts with `offset`, or write smaller files |
| [`hash_required`](https://docs.cmdop.ai/reference/errors/hash_required.md) | replacing a file without `expect_sha256` | Get the hash with `fs_stat` and `hash: true`, then write |
| [`not_found`](https://docs.cmdop.ai/reference/errors/not_found.md) | the path, task or machine does not exist | Check the name; `machines_list` and `tasks_list` show what exists |
| [`bad_args`](https://docs.cmdop.ai/reference/errors/bad_args.md) | the arguments do not match the tool's schema | Fix the call against the tool's page |
| [`permission_missing`](https://docs.cmdop.ai/reference/errors/permission_missing.md) | the OS has not granted screen capture or input | Turn the named permission on in the system settings |
| [`stale_capture`](https://docs.cmdop.ai/reference/errors/stale_capture.md) | a pixel action without a current screenshot | Take a new `screen_capture` first |

Every code, with its full text: [Errors](https://docs.cmdop.ai/reference/errors.md).
