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.
Before you start
Section titled “Before you start”- 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 doctorfails 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.
1. Log in
Section titled “1. Log in”Redeem the invite once per machine. --invite - reads the code from stdin, so it stays out of your shell history and the process list.
zt login --server https://zentri.example.com --invite - --project demoThe output has this shape:
Logged in to https://zentri.example.com as @ana (engineer).Default project: demoSaved 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.
2. Check your setup
Section titled “2. Check your setup”zt doctorEach 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 readyzt 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.
3. See where things stand
Section titled “3. See where things stand”zt statuszt lszt 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.
4. Start a task
Section titled “4. Start a task”Run zt start from your clone, with the task as one argument:
cd ~/src/reportszt 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 3f9a12bcIDs print as their last 8 characters. Worktrees live under $ZENTRI_WORKTREE_ROOT, else $XDG_DATA_HOME/zentri/worktrees, else ~/.local/share/zentri/worktrees.
5. Handle a match with existing work
Section titled “5. Handle a match with existing work”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 pageChoices: 1) join_as_watcher watch the owner's work; the owner is told (default) 2) escalate ask the project leads to decideChoose 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.
6. Attach, detach, and resume
Section titled “6. Attach, detach, and resume”zt attach 3f9a12bcSESSION 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.
7. Answer the agent’s questions
Section titled “7. Answer the agent’s questions”An agent asks a person through the zentri_ask tool. Open questions show up as notices in zt status and in the list:
zt questionszt questions show 9b2ezt questions answer 9b2e --option 2By 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.8. Review decisions
Section titled “8. Review decisions”Agents record their choices with zentri_propose_decision. To read them:
zt decisionszt decisions show 4c1dA low-risk decision is accepted when it is proposed. A high-risk one waits for a lead. Approving decisions covers the review.
9. Ship the branch
Section titled “9. Ship the branch”Commit the work in the worktree, then end the session:
zt done 3f9a12bczt 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.
10. See what coordination saved
Section titled “10. See what coordination saved”zt stats --days 7zt 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.
What can go wrong
Section titled “What can go wrong”| 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). |
Limitations
Section titled “Limitations”zt attachandzt uploadreach 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 --propens pull requests on github.com only. GitHub Enterprise Server is not supported.local-devhas no sandbox. See the coordinator is not a sandbox.