Troubleshooting
Start with zt doctor on the machine that has the problem. It checks the local setup and the path to the coordinator in one run. If the coordinator itself fails, read its log first. See Observability.
zt doctor
Section titled “zt doctor”zt doctor runs 11 checks in a fixed order and prints one line for each:
zt doctorok config /home/ana/.config/zentri/config.json, server https://zentri.example.com, token in the OS keychain (service zentri, account ana@https://zentri.example.com)ok permissions each token and state file is owner-only, in an owner-only directory (3 checked)ok coordinator https://zentri.example.com is live and readyok token the stored user token works for ana (engineer); coordinator version dev, embedder hash-v1ok git 2.47.1 (want 2.31 or later)ok tmux 3.5 (want 3.2 or later)ok claude 2.1.300 (want 2.1.295 or later)warn codex codex is not on PATH; install Codex CLI 0.172.0 or later to run it as the agentwarn opencode opencode is not on PATH; install OpenCode 2.4.2 or later to run it as the agentwarn docker docker is not on PATH; install Docker; only the openshell launcher needs itwarn openshell openshell is not on PATH; install openshell 0.1.10 or later; only the openshell launcher needs itThe names, versions and paths above are examples. Each line is the status, the check’s name, a detail, and after a warning or a failure, a hint that follows ; .
No line carries a token. Each HTTP check waits up to 3 seconds and each program check up to 5 seconds, so zt doctor finishes even when something hangs.
The checks
Section titled “The checks”| Check | ok | warn | fail |
|---|---|---|---|
config |
The config file loads, its server URL is valid, and the token is in the OS keychain or the file, as the line says. | The token is in the file because the OS keychain did not take it, and the line says why. | The file is missing, holds no server or token, does not parse, or has a server URL zt refuses, or the keychain entry it names is gone or cannot be read. |
permissions |
Every token and state file is 0600 or stricter, in a 0700 directory. |
A directory others can list. | A file others can read, or a directory others can write. |
coordinator |
/healthz and /readyz both answer 200. |
The coordinator does not answer, or answers with another status. Fails too when config failed. |
|
token |
GET /v1/me accepts the stored user token. Also shows your handle, your role, and the coordinator’s version and embedder. |
The coordinator refuses the token, or config or coordinator failed. |
|
git |
2.31 or later. | zt cannot read a version. |
Missing, cannot run, or older. |
tmux |
3.2 or later. Uses $ZENTRI_TMUX if set. |
zt cannot read a version. |
Missing, cannot run, or older. |
claude |
Claude Code 2.1.295 or later. | Not on PATH. |
Cannot run, or older. zt start refuses an older one. |
codex |
Codex CLI 0.172.0 or later. | Missing, cannot run, older, or no readable version. | |
opencode |
OpenCode 2.4.2 or later. | Missing, cannot run, older, or no readable version. | |
docker |
The Docker server answers. Shows its version and context. | Missing, not running, or unreadable output. | |
openshell |
0.1.10 or later. Uses $ZENTRI_OPENSHELL if set. |
Missing, cannot run, older, or no readable version. |
Only the openshell launcher needs docker and openshell, so they never fail the run.
Exit code and JSON
Section titled “Exit code and JSON”zt doctor exits 0 when no check fails. A warning does not change that. When any check fails, it prints the lines, then exits 1 with this on standard error:
error: 2 of 11 checks failed--json prints the same results as one JSON object:
zt doctor --json{ "checks": [ { "name": "coordinator", "status": "fail", "detail": "https://zentri.example.com is not ready: /readyz answered 503 unavailable database unreachable", "hint": "check the coordinator's logs and its database" } ], "ok": false}The real output lists all 11 checks. hint is an empty string when status is ok. The exit code is the same as without --json.
zt exit codes
Section titled “zt exit codes”Every zt command uses these codes:
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | An error. The message is on standard error, after error: . |
| 2 | The coordinator needs a choice the command could not make. |
| 3 | zt done refused a checkout that holds uncommitted work. |
See the CLI reference.
Coordinator start-up errors
Section titled “Coordinator start-up errors”The server prints error: and the cause on standard error, then exits 1. In Compose, read it with docker compose -f deploy/docker-compose.yml logs server, or logs migrate for the migration step.
| Message | Fix |
|---|---|
ZENTRI_DATABASE_URL is required |
Set it. migrate up needs it too, even when ZENTRI_MIGRATE_DATABASE_URL is set. |
store: ZENTRI_DATABASE_URL is not a valid Postgres URL |
Fix the URL. The message leaves the URL out on purpose, so it cannot leak the password. |
store: migration database URL is not a valid Postgres URL |
Fix ZENTRI_MIGRATE_DATABASE_URL, or ZENTRI_DATABASE_URL if the first is unset. |
--sweep-interval and --reembed-interval must be positive |
Give each flag a duration above zero, such as 30s. |
tracing: ... |
The OpenTelemetry exporter could not be set up. Check OTEL_EXPORTER_OTLP_ENDPOINT and the other OTEL_* variables, or unset the endpoint. |
ZENTRI_EMBED_BASE_URL is set but ZENTRI_EMBEDDER is hash; set ZENTRI_EMBEDDER=ollama or openai |
Set ZENTRI_EMBEDDER, or unset the base URL. |
ZENTRI_EMBEDDER must be hash, ollama, or openai, not "..." |
Use one of the three. |
embedder configuration: <model> returned <n> dimensions, want 768 |
Pick an embedding model that returns 768 dimensions. |
ZENTRI_LLM_MODEL is set without ZENTRI_LLM_BASE_URL |
Set the base URL, or unset the model. The same holds for ZENTRI_LLM_STEPS and ZENTRI_LLM_REASONING_EFFORT. |
ZENTRI_MODEL_TIMEOUT must be a duration between 0 and 1m |
Use a value such as 5s. |
intents: read data key file: ... |
The path in ZENTRI_DATA_KEY_FILE does not exist, or the server user cannot read it. |
intents: data key file must hold 32 raw bytes, 64 hex characters, or base64 of 32 bytes |
Make the key again with openssl rand -hex 32. |
auth: read ZENTRI_BOOTSTRAP_ADMIN_TOKEN_FILE: ... |
The file is missing or unreadable by the server user. |
auth: ZENTRI_BOOTSTRAP_ADMIN_TOKEN_FILE must hold one zt_a_ token (zt_a_ plus 43 base62 characters) |
Write the file again in that format. See Security hardening. |
The server also warns, and keeps running, in these cases:
| Log line | What it means |
|---|---|
embedder unreachable at start-up; intents run degraded until it answers |
The model server did not answer the start-up probe. Dedup falls back to the offline path. The re-embed job fills in vectors once it answers. |
the LLM judge is off |
An LLM is set without ZENTRI_DATA_KEY_FILE. The judge reads raw prompts, so it needs the key. |
the offline hash embedder catches near-identical wording only, not paraphrases; ... |
You run the default hash embedder. Set ZENTRI_EMBEDDER for matching by meaning. |
intents: model step failed, continuing degraded |
One model call failed. step says which: extract, embed or judge. |
Compose: the server cannot log in to Postgres
Section titled “Compose: the server cannot log in to Postgres”A data volume made before milestone M1 has no zentri_coordinator role, because Postgres creates it only when the volume is first made. Reset the volume once. This deletes every row, so take a backup first.
docker compose -f deploy/docker-compose.yml down -vThe same symptom follows a password change in deploy/.env after the first start. Postgres reads the passwords only when it creates the volume. Change the role’s password in Postgres with ALTER ROLE to match.
zt errors
Section titled “zt errors”zt prints error: and the message on standard error. Errors from the coordinator read coordinator answered <status> <code>: <message>.
| Message | Fix |
|---|---|
not logged in; run zt login --server URL --invite CODE |
Ask an admin for an invite and run the command. |
coordinator answered 401 invalid_invite: the invite code is invalid, expired, or already used |
An invite lasts 15 minutes and works once. Ask for a new one. |
coordinator answered 401 unauthenticated: a valid bearer token is required |
Your token expired or was revoked. A user token lasts 90 days. Log in again with a new invite. |
coordinator answered 403 forbidden: this token may not perform this action |
Your role or your token’s scope does not allow it. See Roles and skill levels. |
coordinator answered 429 rate_limited: too many requests |
Wait for the time in the Retry-After header and try again. See Security hardening. |
coordinator answered 413 body_too_large: the request body is too large |
A request body is over 1 MiB. |
server URL "http://...": plain http is allowed only for a loopback host (127.0.0.0/8, ::1, localhost); use https |
Use the coordinator’s https:// URL. See Docker Compose. |
server URL "..." must start with https:// |
Use an https:// URL. |
server URL must look like https://host[:port][/path], with no user, query or fragment |
Remove any user, query or fragment from the URL. |
the coordinator redirected; zt does not follow redirects, so check the server URL |
Use the final URL, such as https:// in place of http://. |
<path> has mode 0644, so other users may read the token in it; run chmod 600 <path>, and revoke the token if others could read it |
Run the chmod. If others could read the file, ask an admin to revoke the token. |
note: the OS keychain did not take the token (...) |
zt login kept the token in the config file. Unlock the keychain, or on Linux start a Secret Service such as GNOME Keyring, and the next zt command moves the token there. Set ZENTRI_TOKEN_STORE=file on a machine with no keychain to skip it. |
the OS keychain holds no token for HANDLE@SERVER: not logged in |
Something outside zt deleted the entry. Log in again with a new invite. |
read your token from the OS keychain: ... |
Unlock the keychain and try again. A keychain that does not answer in 3 seconds counts as none. |
your token is in the OS keychain, and ZENTRI_TOKEN_STORE=file keeps zt out of it |
Unset ZENTRI_TOKEN_STORE, or log in again to keep the token in the file. |
ZENTRI_TOKEN_STORE=keychain, but no OS keychain answers |
This machine has no keychain zt can reach. Unset ZENTRI_TOKEN_STORE to fall back to the file. zt login stops before it spends the invite. |
ZENTRI_TOKEN_STORE must be auto, file or keychain |
Fix the variable’s value. |
Limitations
Section titled “Limitations”zt doctorchecks one machine. It does not check the Slack bot, the GitHub check or a sandbox.- No command checks the coordinator’s own settings without starting it.