Skip to content

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.

ana and ben start overlapping tickets on auth/login.go. ben runs anyway. Zentri refuses his agent's edit to the file ana holds, names her session, and fails his branch in the merge check until ana's session ends.

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.

  • 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.

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.

Terminal window
zt start "add CSV export to the reports page"

Nothing matches, so the agent starts on a new zentri/... branch.

Terminal window
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 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]:

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.

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.

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.

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-00000000cc01

zt 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.

To start a competing attempt without going through a match, name the intent or session to fork by its full ID:

Terminal window
zt start --fork 01900000-0000-7000-8000-00000000aa01 "try the export with streaming instead"

See sessions and forks.

  • run_anyway or fork is 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 drops run_anyway and fork from the choices and refuses them with resolution_not_allowed. zt prints --resolution run_anyway is not allowed here; rerun with --resolution set to one of ....
  • --yes exits 2. The match has no default. Pass --resolution.
  • A requester gets fewer choices. A requester never starts an agent. fork is dropped, run_anyway becomes queue, and every registration is queued. A Slack-linked user’s registrations are queued too, whatever their role.
  • zt start --queued says the intent is no longer queued. Someone started or ended it already. zt ls shows your sessions.
  • No zt command 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, as done or abandoned, with POST /v1/intents/{intent_id}/status. The HTTP API reference describes it.