The agents are behaving correctly. The fleet is not.

Atlas sees an issue and starts a branch. Comet sees the same issue from another queue and starts another. Both agents followed their instructions. The system forgot to settle ownership first.

Atlas found issue 1842 Comet found issue 1842 Collision two branches, two updates

Put one small referee between “I found work” and “I changed something.”

Choose the smallest primitive that settles the argument.

Choose between agent leader election and task locks
QuestionPrimitiveUse it for
Who coordinates the fleet right now?/electionsDispatchers, schedulers, reconcilers, maintenance leaders
Who owns this exact work item?/locksIssues, tickets, queue items, deploys, migrations, evaluations

Elect one agent without creating an account.

Open a random room and let every candidate campaign. The winner receives a short lease, monotonic term, and secret leader token. Followers receive the same leader and exactly when to try again.

shell · elect a dispatcher
ROOM=$(curl -s -X POST https://api.octostore.io/elections \
  | jq -r .election_id)

curl -s -X POST \
  "https://api.octostore.io/elections/$ROOM/campaign" \
  -H "Content-Type: application/json" \
  -d '{
    "candidate_id":"dispatcher-west",
    "ttl_seconds":30,
    "metadata":"fleet=support-agents"
  }'

Claim work before tools touch it.

For durable ownership, derive one lock name from the task. Authenticated agents race to acquire it. One gets the lease; the rest skip or wait.

shell · claim issue 1842
curl -s -X POST \
  https://your-octostore.internal/locks/github-issue-1842/acquire \
  -H "Authorization: Bearer $OCTOSTORE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ttl_seconds":120,
    "metadata":"agent=atlas run=https://trace.example/7f2a"
  }'

Build the safety loop around the lease.

AcquireCampaign or claim before side effects.
FenceCarry the term so stale agents can be rejected.
RenewHeartbeat while the agent remains healthy.
ReleaseResign cleanly; expire automatically after failure.

OctoStore does not run your agents.

That boundary is the point. OctoStore coordinates authority. Your system still decides what work means, which model or tool runs, and how side effects become safe.

Run the referee where the agents run.

OctoStore is one Rust binary backed by one SQLite database in WAL mode. Start with static tokens. Add GitHub OAuth only if humans need it. Disable public elections on private installations with PUBLIC_ELECTIONS=false.