Draft: this post is not published yet. It is not in the RSS feed or the sitemap, and it is served with noindex.

Why your AI agents keep doing the same work twice

All posts

Running one coding agent is easy to reason about. You give it a task, it works on a branch, and you review what it made. Running five at once is different. Two of them pick up the same ticket. Two others change the same file. Nobody finds out until the branches meet.

This post is about why that happens, and what we built in Zentri to catch it earlier.

Agents cannot see each other

Each agent starts from a prompt and a working copy. It knows the code and the task. It does not know that a teammate’s agent started the same task ten minutes ago, or that another session is halfway through the file it is about to change.

People coordinate with standups, ticket assignments, and a quick message before they touch a shared file. Agents skip all of that. They start fast, and they do not ask.

So the overlap takes a few familiar shapes:

  • Two people hand their agents the same ticket, because nobody assigned it, or because both thought it was theirs.
  • One person starts a task, forgets, and starts it again in another terminal.
  • Two agents on different tasks both decide to change the same file.

Git notices too late

Git is good at merging changes. It is not built to say that two branches do the same job. A merge conflict shows up only after both agents have finished, and a duplicate that touches different lines may not conflict at all. By then one run is wasted, and someone has to compare two versions of the same feature by hand.

Three places to catch it

Zentri is a coordinator that every session checks in with. It runs on your own machines, next to the agents you already use, and it checks for overlap three times.

Before an agent starts. zt start compares the task with the active, queued, and finished work in the project. If the task matches someone else’s active work, you can watch that session or ask a lead to decide. If it matches your own work, you can merge into it, queue behind it, run anyway, or fork a competing attempt.

Before each edit. The kits for Claude Code, Codex, and OpenCode add a hook that claims a file before the agent edits it. If another session holds the file, the edit is refused, and the agent is told who holds it. Other agents, started with zt start --agent, get the git hooks but not the edit hook.

On the pull request. A GitHub check fails a pull request with edits its session never claimed, a file another session holds, or work that duplicates an active task. git commit --no-verify skips the local hooks, but it cannot skip the check. The check is a gate only when branch protection requires it.

What it does not catch yet

Matching runs offline by default. It catches the same ticket and near-identical wording, but not a paraphrase. On 349 labeled training pairs, it matched 0 of the 73 paraphrases.

An optional LLM judge reads the closest stored tasks and answers whether they are the same work. On a fresh held-out set, on a laptop without a GPU, it found 38 of 60 duplicates and wrongly flagged 4 other pairs. That is short of our target. The README has the full numbers.

Zentri is pre-alpha. The sandbox launcher has run only a stub agent so far, and no real Claude Code, Codex, or OpenCode has run in a sandbox yet. The Slack bot has been tested against a fake Slack only.

Counting what it caught

zt stats reports what Zentri caught in one project: duplicate tasks prevented, edit conflicts avoided, and agent questions answered from an earlier answer. The numbers come from records the coordinator already keeps. We have no results to publish yet, so run it on your own project and see what it finds.

Try it

Zentri is open source under Apache-2.0 and runs on your own infrastructure. Every user brings their own agent credentials, and Zentri never collects, proxies, stores, or resells model access or subscription tokens.

Get started with the quickstart, or read the code on GitHub.