---
title: Administer every cell
lastModified: '2026-12-02T10:38:33.000Z'
description: loom cell each applies one supported administration command to every registered cell and records confirmed outcomes in a private local file.
---

`loom cell each` applies one supported administration command to every registered cell and
records confirmed outcomes in a private local file. Run it from the operator's machine with
access to the router and each cell's public HTTPS origin. It needs no local Postgres or
ClickHouse connection, server profile, or root signing secret.

Every cell must be serving and enforced. A cell closed to placements remains a target. An
attaching cell, unsupported server, changed deployment, missing key or incomplete automation
registration refuses the run, and the command names a cell that is not serving or has no
automation bot. A first cell serves once its attach finishes; a later cell stays `attaching`
and blocks every run until `loom cell remove`, run with that cell's own settings, takes it
out of the directory ([cell
control](/docs/operations/cell-control#clear-a-registered-unattached-cells-state)).

## Prepare credentials

Each cell has two distinct key-proof platform-admin bots: one for automation and one for
recovery. Their names and public key thumbprints are registered in the directory. Keep their
private keys separate. The automation bot accepts exactly its approved public key and has no
alternate workload trust. This restriction lets the cell match a short-lived access token's
bot to the one approved key without inventing an assertion key claim in the token.

Register both purposes only after each bot has its own approved key and platform-admin
grant. On the configured cell operator profile, run `loom cell automation --cell CELL
--automation-bot NAME --automation-thumbprint THUMBPRINT --automation-key PRIVATE_FILE
--recovery-bot NAME --recovery-thumbprint THUMBPRINT --recovery-key PRIVATE_FILE`. The
command holds the cell's control lock and runs every check that needs no network first: its
arguments, the cell's public origin, both private key files and any `--ca-file` bundle. Only
then does it claim the cell's current directory registration, which rotates the control
generation, and prove both keys through the cell's public authentication and
bot-registration endpoints before writing the public pair. Neither private key is sent to
the router. A later cell, which stays `attaching`, can provision while it holds no
placements. Its local first row and both accepted fingerprints must match the registration,
and its local mode row must hold `recording` or `enforced` (a later cell reads as enforced
with either), with distinct published main and probe origins and a serving, enforced first
cell. Incomplete preparation refuses; provisioning changes nothing but the control
generation, the public pair and their audit rows. The fleet administration command still
requires every cell serving and enforced. While the cell stays `attaching`, every read of
the recorded pair refuses: the cell's own administration read answers 503 and the operator
point read 409 `CELL_NOT_READY`, so the pair shows only in the command's answer and the
directory's `administration` audit row.

Create a private credential manifest with these fields:

| Field               | Value                                                                         |
| ------------------- | ----------------------------------------------------------------------------- |
| `version`           | `1`                                                                           |
| `router_token_file` | Absolute path to the private router operator-token file                       |
| `keys`              | One entry per target, with `cell`, `deployment_id` and an absolute `key_file` |
| `ca_file`           | Optional absolute path to an explicit CA certificate bundle                   |

The manifest, token and key files must be regular files owned by the current user, with
private permissions and private containing directories. Symlinks and unsafe writable
ancestors refuse. The command does not change permissions or use ambient server credentials.
It reads each automation key at use, derives its public thumbprint, and refuses a mismatch
before signing. It never tries a recovery key.

Use the router's exact HTTPS origin for `--router`. Redirects and ambient HTTP proxies are
disabled. The operator token goes only to the router; assertions and cell tokens go only to
the cell's exact public origin. Normal CA and hostname verification applies. For private
PKI, configure the cell server's operating-system CA trust for its router connection. The
server uses the normal TLS trust store, including `SSL_CERT_FILE` when the operator supplies
it, while ignoring ambient HTTP proxies. The manifest's `ca_file` controls the command's
router and cell connections; it does not change the server's trust store. Over `https`
neither side disables certificate or hostname verification. The server reads its
administration pair from `LOOM_CELL_ROUTER_URL`, the base URL its other router calls use.
With an `http` value the cell's router credential travels in clear text and the router's
answer naming the automation bot is unauthenticated: use `http` only on a network path to
the router you trust.

## Run a supported command

Set `ROUTER`, `CREDENTIALS` and `STATE` to the trusted router origin, private manifest path
and a fresh private outcome-file path, then run:

```bash
loom cell each --router "$ROUTER" --credentials "$CREDENTIALS" --state "$STATE" -- settings list
```

The supported command families are closed:

| Family         | Actions                                                 |
| -------------- | ------------------------------------------------------- |
| `settings`     | `list`, `set`, `reset`, `history` for live settings     |
| `signing-key`  | `list`, `rotate`, `retire`                              |
| `revoke-token` | One exact global subject                                |
| `ratelimit`    | Namespace-name limit, shared across orgs with that name |
| `budget`       | Operation budget or consumer multiplier                 |
| `blacklist`    | Global `add`, `list`                                    |

Tenant policy, org-limit sweeps, arbitrary commands and native store operations are not
supported. Use `loom cell each --help` for coordinator options. A server lacking the
capability contract or requested action refuses before business work; the command does not
fall back to an older API.

Each action calls the code that `loom settings`, `loom signing-key`, `loom revoke-token`,
`/v1/admin/budget.set`, `/v1/admin/ratelimit.set` and `blacklist.add` call, with the same
checks. The cell runs it inside one bounded context: a thirty-second deadline for the whole
action, a two-second limit on each ClickHouse statement that sets no limit of its own, and
fixed memory, rows-read and result ceilings on each ClickHouse read. Inserts, the audits
included, get only the time limit. Postgres statements keep the cell's statement timeout. A
read that hits a ceiling fails the action rather than returning part of an answer. The
answer is capped at 2 MiB.

Long text is shortened only in what an action answers, never in what it reads or stores.
`blacklist global list` shows the first 512 characters of each reason and 256 of each
author, and sets `reason_truncated` or `created_by_truncated` when it shortened one.
`settings list` shows the first 512 characters of a longer text value and sets
`value_truncated`; `settings history` shows the first 2048 characters of a longer value's
JSON and sets `value_truncated` or `previous_truncated`.

A cell refuses before its started audit, with no business work, when the bot or cell cannot
be verified or an argument is invalid: an unknown, secret or startup-only setting, a value
the setting refuses, an unknown rate-limit class or operation, a subject no token carries, a
regex that does not compile or would take the cell's global regexes past their RE2
instruction budget, or a signing-key retire or rotation that `loom signing-key` would refuse
on that cell (such as a key it does not hold, retiring its last signer, or rotating sooner
than its refresh allows). Any failure after the started audit, a deadline or ceiling
included, answers as unsettled. A subject revocation that is recorded but does not finish
is unsettled too; running `loom revoke-token` again on that cell finishes it.

The command runs one cell at a time and stops at the first cell that does not complete,
whether its outcome is a known no-action refusal or unsettled; `--resume` continues from
that cell. A run starts no new cell when less than one action's time is left of its hour; it
then stops and says so, leaves that cell pending, and `--resume` continues it. A cell whose
checks before the action end with less than that time left, for any reason, also stays
pending under the same message. It reads the directory before the run, again for each
target, and once after all attempts. Exit zero requires every target to have a confirmed
completion and the final identities to match. Directory drift discovered at the end fails
the run while retaining the completed history.

## Resume confirmed failures

Use the existing state file without supplying another command:

```bash
loom cell each --router "$ROUTER" --credentials "$CREDENTIALS" --resume "$STATE"
```

Completed cells are not repeated. Confirmed pre-business refusals can be attempted again
with fresh credentials. The original command and router binding cannot change. New cells
require complete key coverage and are appended only while existing target identities remain
unchanged. Removed or replaced targets refuse continuation.

A target's identity includes its deployment, origin, state, control generation,
configuration fingerprints and automation and recovery public identities, so any change to a
saved target refuses resume. A routine cell control command such as `loom cell update` is
such a change, and so is re-provisioning the automation or recovery key with
`loom cell automation`: each control claim rotates the control generation. A router
credential rotation with `loom cell credential` changes none of them. A new `--state` run
repeats the command on every cell, completed ones included: a second signing-key rotation,
or a second global blacklist pattern with the same text. To finish the remaining cells
instead, read the outcome file: each cell's entry under `outcomes` has `status` `completed`
or not. Run the same change on each cell that has not completed through that cell's own
administration: the `loom settings`, `loom signing-key` and `loom revoke-token` commands, or
`/v1/admin/budget.set`, `/v1/admin/ratelimit.set` and `blacklist.add` with that cell's
platform-admin token.

`dispatching` and `UNSETTLED` indicate that a mutation may have reached a cell without a
confirmed response. Resume stops before credential or network access. Preserve the state,
then check that cell's audit log and the state the command changes before any new run; do
not edit away uncertainty or automatically replay the command. Action correlation is not
idempotency, and an HTTP error alone does not prove no action ran.

## Read the outcome file

Each cell's entry under `outcomes` has a `status` and, for a cell that did not complete, a
`code`. These codes are written by `loom cell each` to its own file; they are not server
error codes.

| `status`          | `code`               | Meaning                                                                                                                |
| ----------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `pending`         | empty                | Not attempted yet.                                                                                                     |
| `completed`       | empty                | The cell confirmed the action.                                                                                         |
| `known-no-action` | `PREFLIGHT_REFUSED`  | A check before the action failed: the router point read, the bot token, its remaining lifetime or the capability read. |
| `known-no-action` | `RATE_LIMITED`       | A call before the action got HTTP 429. Resume later.                                                                   |
| `known-no-action` | `READ_INCOMPLETE`    | A read was sent but not confirmed. A read changes nothing, so resume repeats it.                                       |
| `known-no-action` | a cell refusal code  | The cell refused before running the action; the code is the cell's, in upper case.                                     |
| `dispatching`     | empty                | The action may have been sent; the run stopped before recording an answer.                                             |
| `UNSETTLED`       | `COMPLETION_UNKNOWN` | A mutation was sent and its completion is not confirmed.                                                               |

The cell refusal codes are `AUTOMATION_REQUIRED`, `BROWSER_REFUSED`, `SECURITY_UNAVAILABLE`,
`SHORT_TOKEN_REQUIRED`, `CELL_UNAVAILABLE`, `CELL_IDENTITY_CHANGED`,
`AUTOMATION_UNPROVISIONED`, `AUTOMATION_IDENTITY_CHANGED`, `AUTOMATION_KEY_CHANGED`,
`AUTOMATION_REVOKED` and `INVALID_ARGUMENTS`. `BROWSER_REFUSED` is a request a web page
could have sent: a cross-site `Origin` or `Sec-Fetch-Site`, or a remote call with
authentication off. `SECURITY_UNAVAILABLE` is a bot or cell that could not be verified, and
`CELL_UNAVAILABLE` a cell whose identity is not live, or a store or audit failure after
verification and before the started audit is confirmed; both answer 503 and can be retried.
`AUTOMATION_UNPROVISIONED` answers 409 when the cell cannot read its automation bot from the
router, and no retry passes until the cause is fixed: run `loom cell automation` when the
router names no automation bot for the cell, fix the cell's router URL and credential
configuration, or replace a stale cell credential with `loom cell credential`. A
`known-no-action` cell is attempted again on resume; `dispatching` and `UNSETTLED` stop
resume as described above.

Keep outcome files private. They contain public target identities, command arguments,
completion hashes and result digests, with no access token or private key. Command arguments
can still contain sensitive setting values or blacklist text. Preserve the file and its
sibling lock location for the lifetime of the run.
