Two engineers on the same task
Two people often ask for the same change on the same day. Zentri checks every task against active, queued, and finished work before an agent starts. This guide walks through that check from the second engineer’s side, and explains every choice it can offer.
The recording is make demo, offline, with the real CLI, hooks, and merge check, a fake claude, a fake tmux, and a fake GitHub API. Offline matching cannot tell that ben’s reworded ticket is the same work, so the script marks his intent active_duplicate in SQL, the way the LLM judge would. The asciinema cast has the same run as text.
Before you start
Section titled “Before you start”- Two users in the same project, each logged in with
zt login. This guide calls them Ana and Ben. - Both have role engineer or above. A requester’s choices differ, as what can go wrong explains.
How the check classifies a task
Section titled “How the check classifies a task”The coordinator compares the new task with the project’s intents and gives it one class:
| Class | Meaning |
|---|---|
new |
Nothing close. The agent starts. |
active_duplicate |
The same work, or work on the same ticket, is active or queued. |
already_done |
The same work, or work on the same ticket, already finished. |
partial_overlap |
Related work exists, but this task is not the same. |
The thresholds behind these classes are per project. Calibrating dedup thresholds explains them. A per-project lock serializes registration, so of two tasks registered at the same moment, the second is always compared with the first.
1. Ana starts the work
Section titled “1. Ana starts the work”zt start "add CSV export to the reports page"Nothing matches, so the agent starts on a new zentri/... branch.
2. Ben asks for the same work
Section titled “2. Ben asks for the same work”zt start "export the reports page as CSV"The coordinator finds Ana’s active intent. Ben sees the match and his choices before anything starts:
This task matches existing work (active_duplicate). intent 7d0e44a1 active @ana score 0.91 session 3f9a12bc 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]:zt lists up to three candidates. The score is the similarity the classifier used. When the embedder or the judge failed, a line (matching ran degraded: ...) names the steps that did not run.
On a terminal, Enter takes the default. Without a terminal, or with --json, zt start exits 2 and prints the choices, so a script can rerun with --resolution NAME, or with --yes to take the default.
3. Pick a choice
Section titled “3. Pick a choice”The choices depend on the class and on who owns the matching work:
| Match | Choices | Default |
|---|---|---|
active_duplicate, your own work |
merge, queue, run_anyway, fork |
none |
active_duplicate, someone else’s work |
join_as_watcher, escalate |
join_as_watcher |
active_duplicate, someone else’s, made a duplicate only by the LLM judge |
join_as_watcher, escalate, run_anyway |
none |
already_done |
run_anyway, escalate |
none |
partial_overlap |
run_anyway, queue |
run_anyway |
When only the LLM judge called the tasks duplicates, run_anyway stays on the list and there is no default, so a misread never stops an agent unasked.
What each choice does
Section titled “What each choice does”| Choice | Effect | What zt prints |
|---|---|---|
join_as_watcher |
Your intent becomes watching. No agent starts. The owner and the owner’s live session get a notice. |
You now watch @ana's work on intent 7d0e44a1. @ana was notified. |
escalate |
Your intent becomes escalated. No agent starts. The org’s leads, or its admins when it has no leads, get a notice. |
Escalated intent <id>. The project leads were notified and decide how it proceeds. |
merge |
Your intent becomes merged into your own matching work. No new session starts. |
Merged into intent <id> by @ana. No new session started. and how to attach to its session |
queue |
Your intent becomes queued and waits for the matching intent. No agent starts. |
Queued as intent <id>. No agent runs for it yet. then It waits for intent <id> by @ana. |
run_anyway |
Your intent becomes active and an agent starts in its own worktree. |
The usual Started session ... lines |
fork |
A competing attempt at the same intent starts next to the existing one. | The usual Started session ... lines |
Ana sees Ben’s choice in her notices:
Notices: Nov 30 10:42 @ben is now watching your intent 7d0e44a1.When Ben escalates instead, each lead’s notices read @ben escalated a match: their intent ... overlaps intent ... (active_duplicate). A lead needs to decide.
4. Start queued work when its wait ends
Section titled “4. Start queued work when its wait ends”When the intent a queued one waits on ends, its owner gets a notice that names the exact command:
Your queued intent 9c3b77e0 can start: intent 7d0e44a1 is done. Run: zt start --queued 01900000-0000-7000-8000-00000000cc01zt ls also lists each queued intent of yours whose wait ended, with the same command. --queued takes the full intent ID. Its owner (engineer or above) or a lead may start it. When the waited-on intent is still running, zt starts the queued one anyway and warns:
zentri: intent 9c3b77e0 waited on intent 7d0e44a1, which is still active; starting it anyway.5. Fork on purpose
Section titled “5. Fork on purpose”To start a competing attempt without going through a match, name the intent or session to fork by its full ID:
zt start --fork 01900000-0000-7000-8000-00000000aa01 "try the export with streaming instead"See sessions and forks.
What can go wrong
Section titled “What can go wrong”run_anywayorforkis missing or refused. When the matching intent was registered less than 5 seconds earlier with the same normalized text, or a cosine similarity of 0.97 or more, the coordinator treats the second task as a double submission. It dropsrun_anywayandforkfrom the choices and refuses them withresolution_not_allowed.ztprints--resolution run_anyway is not allowed here; rerun with --resolution set to one of ....--yesexits 2. The match has no default. Pass--resolution.- A requester gets fewer choices. A requester never starts an agent.
forkis dropped,run_anywaybecomesqueue, and every registration is queued. A Slack-linked user’s registrations are queued too, whatever their role. zt start --queuedsays the intent is no longer queued. Someone started or ended it already.zt lsshows your sessions.
Not built yet
Section titled “Not built yet”- No
ztcommand resolves an escalated intent. Leads get the notice and settle it with the people involved. The owner or a lead can end an intent that has no live session, asdoneorabandoned, withPOST /v1/intents/{intent_id}/status. The HTTP API reference describes it.