---
title: "Discussion on \"An atomic claim stops two agents taking one ticket. It doesn't stop two tickets for one job.\" | Hashnode"
description: "Discussion on \"An atomic claim stops two agents taking one ticket. It doesn't stop two tickets for one job.\". A field note on the three places double work gets past a claim lock, with a state diagram and a 40-line pre-claim check."
url: "https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [An atomic claim stops two agents taking one ticket. It doesn't stop two tickets for one job.](https://wagglet-tool.hashnode.dev/two-tickets-one-job-double-work-ai-agents?utm_source=hashnode&utm_medium=feed)

A field note on the three places double work gets past a claim lock, with a state diagram and a 40-line pre-claim check.

Oct 7 · 8 min read · wagglet-tool.hashnode.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#project-management](https://hashnode.com/tag/project-management)
-   [#developer-tools](https://hashnode.com/tag/developer-tools)
-   [#productivity](https://hashnode.com/tag/productivity)

## Written by

[Sam Novak](https://hashnode.com/@sammnov)

@sammnov · Boston, USA

  
[View profile](https://hashnode.com/@sammnov)

## Responses 9

Markdown supported · ⌘↵ to post

[Kartik N V J K](https://hashnode.com/@kartik-nvj)

[Oct 8](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac7de8cb9bfbf329000e96f)

The gap between 'two agents, one ticket' and 'two tickets, one job' is one I had not framed that cleanly, and your webhook-retry example makes it obvious. The pre-claim overlap check is smart, but the 'claim goes quiet' leak is the one I would worry about most, since a stalled runner looks identical to a slow one. How does the Preparer decide a quiet claim is dead without killing a runner that is just slow?

[Sam Novak](https://hashnode.com/@sammnov)

[Oct 9](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac7de8cb9bfbf329000e96f#reply-6ac8b9eed7730987a7fa0867)

Thanks. You’ve put your finger on the hard part. From the outside you can’t tell a stalled runner from a slow one, so the Preparer doesn’t try to guess. A claim that has gone quiet past its window gets flagged, just like an overlap does. Someone who can see the runner then decides to release the claim or leave it alone. Auto-killing would be fine if a wrong kill cost nothing, but it costs you half-finished work and sometimes a second agent starting the same job, which is the problem the post is about. A heartbeat from the runner would narrow the window, but someone still has to decide.

[Salman Parvez | ML Systems](https://hashnode.com/@ml-systems)

[Oct 7](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac6cb5e05db0c2b0379ec8e)

"Delivery is not acceptance" could come straight off a job site. Finishing the work and having it signed off are two different days, and the punch list lives between them. Your overlap check is the scope-gap problem from the other direction: in an estimate two trades can both carry the same work, or neither does. I like that the script only flags the pair and leaves the call to a named person.

[Sam Novak](https://hashnode.com/@sammnov)

[Oct 9](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac6cb5e05db0c2b0379ec8e#reply-6ac8b9fc57a8900f8a036d1e)

The punch list comparison is spot on. “Done” and “accepted” are different events with different owners, and most trackers treat them as one status. Your estimate example also fits the overlap check well. Two trades carrying the same scope is the duplicate case. Neither one carrying it is the gap case, and a snapshot check can’t catch that one, because there’s nothing on the board to compare. That might be worth its own post.

[Salman Parvez | ML Systems](https://hashnode.com/@ml-systems)

[Oct 9](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac6cb5e05db0c2b0379ec8e#reply-6ac9125c8739caa3cf56627c)

Agreed, the gap case is the hard one. The only way I've seen it caught is comparing against a list of what should exist, not what's on the board. In estimating that list was the scope checklist for each trade. Something has to say a line is missing before anyone can notice it. I'd read that post.

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[Oct 7](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac65649eb790aec3a54b880)

The send-back versus reopen distinction suggests an execution-generation check as well as a board-state check. Closing the old branch does not necessarily stop an already-running agent from pushing or delivering later; the acceptance boundary needs to know which attempt currently owns the item.

I would add a fixture where an old runner delivers after reopen and a new claim. Its result should remain associated with the obsolete attempt rather than replacing the new runner's delivery. That complements your snapshot overlap check: one prevents accidental duplicate starts, while the other prevents stale work from becoming the accepted result.

[Sam Novak](https://hashnode.com/@sammnov)

[Oct 9](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac65649eb790aec3a54b880#reply-6ac8ba0857a8900f8a036e1e)

Agreed, and this is a real gap. Closing the old branch changes the board but doesn’t stop a runner that’s already in flight. If it delivers after the reopen and a new claim, nothing in the post stops that late delivery from landing as if it were current. Tagging each claim with an attempt ID, and accepting a delivery only when its ID matches the item’s current one, would cover it. Anything else stays attached to the old attempt for someone to look at, but never replaces the new runner’s work. I’ll add the fixture you described. “Prevents duplicate starts” and “prevents stale work from being accepted” are two separate guarantees, and the post only covers the first.

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[Oct 11](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac65649eb790aec3a54b880#reply-6acb57ede6c2e1ee30cf7ac3)

The attempt ID covers the missing ownership boundary. I would make its comparison and the acceptance write a single conditional operation, because an old runner could pass a separate check just before a new claim changes the current attempt.

That adds a useful interleaving to your fixture: pause the old delivery after reading ownership, reopen and claim the item, then resume acceptance. The old result should still be retained for inspection, while the conditional write refuses to make it current.

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[Oct 11](https://hashnode.com/posts/two-tickets-one-job-double-work-ai-agents/6ac6153fca7d7e8d62c65e73/comment/6ac65649eb790aec3a54b880#reply-6acb57f9233c0e648ef711cc)

The attempt ID covers the missing ownership boundary. I would make its comparison and the acceptance write a single conditional operation, because an old runner could pass a separate check just before a new claim changes the current attempt.

That adds a useful interleaving to your fixture: pause the old delivery after reading ownership, reopen and claim the item, then resume acceptance. The old result should still be retained for inspection, while the conditional write refuses to make it current.
