Skip to content

An engineer's day

This guide follows one engineer through a working day with zt. By the end you have started an agent on a task, handled a match with existing work, left the session and come back, answered the agent’s questions, and shipped the branch.

  • The coordinator’s URL and a single-use invite code from an admin.
  • git 2.31 or later and tmux 3.2 or later. zt doctor fails without them.
  • An agent CLI that you have signed in to yourself: Claude Code (claude, the default), Codex (codex), or OpenCode (opencode).
  • A clone of the project’s repository on this machine.

Redeem the invite once per machine. --invite - reads the code from stdin, so it stays out of your shell history and the process list.

Terminal window
zt login --server https://zentri.example.com --invite - --project demo

The output has this shape:

Logged in to https://zentri.example.com as @ana (engineer).
Default project: demo
Saved your token to the OS keychain (service zentri, account ana@https://zentri.example.com).

The token is never printed. It goes to the OS keychain: the macOS Keychain, the Windows Credential Manager, or the Secret Service on Linux. Where no keychain answers, as over SSH or in a container, it goes to the config file with mode 0600, and zt login says why. The config file holds your server and defaults. It is $ZENTRI_CONFIG, else $XDG_CONFIG_HOME/zentri/config.json, else config.json in the zentri folder of your OS config directory.

Terminal window
zt doctor

Each line reads ok, warn, or fail, then the check’s name and what it found, with a hint after a warning or a failure. The checks cover the config file, the modes of the files that hold tokens, the coordinator’s /healthz and /readyz, your stored user token, git, tmux, the agent CLIs, docker, and openshell. A healthy run starts like this:

ok 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 coordinator https://zentri.example.com is live and ready

zt doctor exits 1 when a check fails. A missing agent CLI only warns, and so do docker and openshell, which only the openshell launcher needs.

Terminal window
zt status
zt ls

zt status shows who you are, where your token is, your live sessions on this machine, and your new notices:

Logged in to https://zentri.example.com as @ana (engineer).
Token in the OS keychain (service zentri, account ana@https://zentri.example.com).
No live sessions on this machine.
No new notices.

zt ls lists the project’s active, queued, and watching intents, newest first. --mine narrows it to yours, and --all adds finished work. A * in the LOCAL column marks an intent whose session runs from this machine.

Run zt start from your clone, with the task as one argument:

Terminal window
cd ~/src/reports
zt start "add CSV export to the reports page"

The coordinator compares the task with active, queued, and finished work first. When nothing matches, zt creates a git worktree on a new zentri/... branch, starts the agent in a detached tmux session, and passes your task as the agent’s last argument:

Started session 3f9a12bc for intent 7d0e44a1 (new).
branch zentri/add-csv-export-to-the-reports-page-<id>
worktree /home/ana/.local/share/zentri/worktrees/reports/add-csv-export-to-the-reports-page-<id>
Attach with: zt attach 3f9a12bc

IDs print as their last 8 characters. Worktrees live under $ZENTRI_WORKTREE_ROOT, else $XDG_DATA_HOME/zentri/worktrees, else ~/.local/share/zentri/worktrees.

When the task matches existing work, zt prints the match and the choices before anything starts:

This task matches existing work (active_duplicate).
intent c81f0b52 active @ben score 0.93 session 51c2a0de
add CSV export to the reports page
Choices:
1) join_as_watcher watch the owner's work; the owner is told (default)
2) escalate ask the project leads to decide
Choose 1-2 or a name [join_as_watcher]:

On a terminal, Enter takes the default. Without a terminal, zt start exits 2 and tells you to rerun with --resolution or --yes. Two engineers on the same task explains every choice.

Terminal window
zt attach 3f9a12bc

SESSION is the full ID or its last 4 or more characters. Without it, zt picks your only live session, or lists them when there are several.

zt attach attaches your terminal to the agent’s tmux session. To leave the agent running, detach the way you detach from any tmux session: press the tmux prefix (Ctrl-b unless you changed it), then d. The agent keeps working. Run zt attach again later to resume where it is.

The tmux session also has a second window named zentri, which runs the session’s heartbeat. Leave it open.

An agent asks a person through the zentri_ask tool. Open questions show up as notices in zt status and in the list:

Terminal window
zt questions
zt questions show 9b2e
zt questions answer 9b2e --option 2

By default zt questions shows the open questions your role may answer: a product question takes a requester or above, a technical one an engineer or above. --mine shows only questions asked of you. Without --option or --text, zt questions answer shows the question and reads one line: a number picks that option, anything else is a free answer.

Answered question 9b2e1c07: ...
The agent that asked gets the answer on its next tool call.

Agents record their choices with zentri_propose_decision. To read them:

Terminal window
zt decisions
zt decisions show 4c1d

A low-risk decision is accepted when it is proposed. A high-risk one waits for a lead. Approving decisions covers the review.

Commit the work in the worktree, then end the session:

Terminal window
zt done 3f9a12bc

zt done marks the session done, stops the agent, and deletes the session token. It keeps the branch and the worktree:

Session 3f9a12bc is done and its agent is stopped.
zt kept the branch and the worktree:
branch zentri/add-csv-export-to-the-reports-page-<id>
worktree /home/ana/.local/share/zentri/worktrees/reports/add-csv-export-to-the-reports-page-<id>
zt pushed nothing. zt done --push 3f9a12bc pushes the branch to origin, and --pr also opens a pull request.

To publish in the same step, add --push, or --pr to also open a pull request on github.com. zt pushes with your own git and its credentials and never forces a push. For --pr it uses your gh login, or else GH_TOKEN or GITHUB_TOKEN. That token goes to GitHub and never to the coordinator.

If the project runs the GitHub merge check, the pull request gets a zentri/merge-check verdict.

Terminal window
zt stats --days 7

zt stats reports duplicates prevented, conflicts avoided, answers reused, time to answer, question and decision counts, and the model router’s counts for the period. The default is 30 days.

Symptom Cause and fix
zt login refuses the server The URL must use https. Plain http works only for a loopback host.
zt doctor fails config You have not logged in, or the file is unreadable. Run zt login again.
zt start exits 2 The task matches existing work and there is no terminal to ask on. Rerun with --resolution NAME, or --yes to take the default. --yes also exits 2 when the match has no default.
zt done exits 3 The worktree holds modified, staged, or untracked files that no commit holds. zt lists them and changes nothing. Commit or remove them, then rerun.
A push or pull request fails after zt done The session is already done. Rerun zt done with the same flags and the session ID.
The agent’s edit is refused with another session holds a file this edit would change Another session claimed the file. See one engineer with two sessions.
The agent’s edit is refused with Zentri coordinator unreachable The edit hook could not reach the coordinator. Edits wait unless the project allows them to go ahead (edits_fail_open).
  • zt attach and zt upload reach only sessions started on this machine.
  • File claims before each edit work for Claude Code, Codex, and OpenCode. Any other agent gets only the git pre-commit hook, which warns and never blocks. See generic MCP agents.
  • zt done --pr opens pull requests on github.com only. GitHub Enterprise Server is not supported.
  • local-dev has no sandbox. See the coordinator is not a sandbox.