Skip to content

AI uses for records

Multi-agent duplicate work detection: an ownership and coverage test

By SourceX Editorial · Updated

10 sections

Short answer

Multi-agent duplicate work detection needs a ledger, not a transcript. Before the run, give every required task a stable business ID and an ownership rule. During the run, log claims, handoffs, completions and side effects against those IDs. Afterwards, compare the ledger with the system of record: tasks completed more than once are duplicates, required tasks with no verified completion are gaps, and claims without state evidence are false completions.

Agent run

Multi agent duplicate work

This page covers multi-agent duplicate work detection: an ownership and coverage test.Illustrative

Key takeaways

  • Fix the required task set, its business IDs and an ownership rule before any agent runs; IDs minted during the run hide duplicates.
  • Protocol task IDs, such as A2A's server-generated IDs, track a remote agent's processing, not your business task, so map them.
  • Queues and retries duplicate work on their own; capture receive counts, leases and a dedup key for every irreversible action.
  • Inject overlapping roles, gaps, crashes, duplicate delivery and human edits on purpose, one at a time.
  • Report coverage, duplicate completions, duplicate side effects and false completions separately, with the spread across repeats.

How do you detect duplicate work and missed tasks in a multi-agent run?

Detect both with the same instrument: a task ledger keyed by business task IDs that exist before any agent starts, checked against the end state of the systems the agents changed. Duplicates are task IDs with more than one completion or more than one irreversible side effect. Missed tasks are required IDs with no verified completion. Everything else in the evaluation design exists to make those two counts trustworthy.

The key word is before. If the agents mint task identifiers as they go, two agents doing the same work produce two different IDs and nothing looks duplicated. If the required set is inferred from what the agents did, a task nobody picked up never appears at all. The required task set, its dependencies and the rule that says who should own each task are fixed inputs of the test, written down by someone who knows the business process.

This page lays out that design: the components, the ledger fields, the perturbations that force duplicate and missed work to occur, the metrics, an illustrative worked run and the exceptions where repeated work is intentional. It describes a method and reports no benchmark results.

Why a tidy final report can hide a duplicate and a gap at the same time

Because the usual outputs average the failures away. A run where one task was done twice and another was never done can produce the right number of completion messages, a confident summary and a plausible final artifact. Only a per-task comparison against the required set shows that one count is high and another is zero.

Researchers who study multi-agent failures see the same pattern. The MAST taxonomy, built from annotated traces across several open multi-agent frameworks, groups failures into system design issues, inter-agent misalignment and task verification, and argues that many failures come from organizational design and coordination rather than from the limits of a single agent. Its categories include step repetition, failing to recognize termination conditions and premature termination, which map directly onto duplicated work and unfinished work.

The practical consequence for evaluation is that grading the final answer, or the last agent's message, is not enough. A duplicate vendor email, a second refund or two conflicting calendar holds are business harms even when the final report reads well. The design has to look at every side effect, and attribute each one to a task ID and an agent.

Where ownership slips: delegation, handoffs, redelivery and restarts

Ownership slips at every boundary where one component hands work to another and the identifiers change. The common frameworks and infrastructure each document a boundary that an evaluation should test.

In the Agent2Agent (A2A) protocol, task IDs are generated by the server agent when it creates a task, every new task gets a unique ID, and client-provided IDs for new tasks are not supported. Tasks in a terminal state, such as completed, failed, canceled or rejected, cannot accept further messages. So if a coordinator sends the same piece of business work twice, or restarts after a failure, the remote agent sees two distinct tasks. The A2A task ID tracks the remote agent's unit of processing; it is not your business task key, and the ledger must map one to the other.

The OpenAI Agents SDK documents two orchestration patterns with different ownership semantics. With handoffs, a specialist becomes the active agent for the rest of the turn; with agents as tools, a manager keeps control and calls specialists for bounded subtasks while owning the final answer. Handoffs are exposed to the model as tools named like transfer_to_refund_agent. An evaluation should record which pattern each step used, because who owns completion differs between them.

Below the agents, queues and retries create duplicates on their own. Amazon SQS documents at-least-once delivery for standard queues and says the visibility timeout reduces, but cannot fully prevent, a second delivery; a message not deleted before the timeout expires, for example after a crash, becomes visible again. AWS recommends idempotent consumers. Stripe's idempotent requests show what that looks like at an API: a repeated request with the same key returns the saved result of the first, and reusing a key with different parameters returns an error.

Where ownership slips: delegation, handoffs, redelivery and restarts
BoundaryDocumented mechanismFailure it can causeLedger evidence to capture
Delegation to a remote agentA2A server-generated unique task IDs; terminal tasks accept no more messagesSame business task sent twice gets two remote task IDsBusiness task ID mapped to every remote task ID
HandoffAgents SDK handoff makes the specialist the active agent for the turnCoordinator and specialist both believe they own completionOwner before and after, with the handoff time
Manager calling specialistsAgents as tools: the manager owns the final answerSpecialist output dropped or merged twice by the managerEach specialist call and which output the manager used
Queue redeliverySQS at-least-once delivery and visibility timeout expiryTwo workers process one message; or a crash leaves work unclaimedReceive count, claim time, lease expiry and deletion time
Retried side effectStripe idempotency keys replay the first result for the same keyA retry without a key repeats an irreversible actionIdempotency or dedup key per side effect
Exclusive claimKubernetes Leases coordinate activity and leader election, renewed by updating renewTimeTwo agents hold stale claims on one task after a stallHolder, renew time and lease duration per claim

The task ownership and coverage evaluation design, component by component

The design has eight components, and each one is an artifact that can be reviewed before any agent runs. Write them down in this order, because each depends on the one above it.

The ownership rule deserves the most care, because it is what turns two completions into a defect rather than a difference of opinion. State it as a function of task attributes that a grader can evaluate without judgment: the payables role owns every task that sends a message to a vendor, the reconciliation role owns every task that changes a ledger balance, and the coordinator owns anything that matches neither. Add an explicit tie-break for tasks that match two rules, and an escalation path for tasks that match none. If the rule cannot be written this way, the scenario is not ready.

The task ownership and coverage evaluation design, component by component
ComponentWhat it containsWho signs it offFailure if skipped
Required task setEvery unit of work the scenario needs, with stable business IDs and a required or optional flagProcess ownerMissed tasks are invisible
Dependency graphWhich tasks block which, and which can run in parallelProcess ownerOut-of-order work scored as complete
Ownership ruleWhich role should own each task, and the tie-break when two roles qualifyProcess owner and agent designerDuplicates cannot be called wrong
Claim protocolHow an agent claims a task, how long the claim lasts and how it is releasedAgent designerStale claims and silent double work
Side-effect registryEvery irreversible action per task, with its dedup keyAgent designerDuplicate emails or postings go uncounted
Ground-truth end stateThe record values each required task must leave behindProcess ownerFalse completions pass
Perturbation scheduleWhich faults are injected, when, and in which scenariosEvaluation engineerCoordination is only tested on the happy path
Metric and review planFormulas, repeat count, and how disputed cases are adjudicatedEvaluation engineerScores that cannot be compared between runs

Ledger fields that let a grader attribute every completion

Log one row per event against the business task ID, and make the grader reconstruct ownership from events rather than from agents' self-reports. Agents can be asked to emit these events, but the side-effect and state fields should come from the tools and systems themselves, so a confused agent cannot misreport its own work.

  • task_id: the business task key from the required set, never an ID minted during the run.
  • event_type: claim, release, handoff_out, handoff_in, delegate, side_effect, completion_claim or state_check.
  • agent_id and role: the agent that produced the event and the role it was playing.
  • remote_refs: any framework or protocol identifiers involved, such as an A2A task ID or a queue message ID, mapped to task_id.
  • claim_lease: claim time, lease duration and renewal times, so stale claims can be detected.
  • side_effect_key: the dedup or idempotency key for each irreversible action, plus the target record.
  • evidence_ref: the system-of-record read that supports a completion claim, with the values returned.
  • human_edit: any change a person made during the run, so the grader does not blame an agent for it.
  • authority_ref: the rule or instruction that authorized the action, for tasks where ownership depends on approval.

Perturbations that make duplicates and gaps happen on purpose

A coordination test on the happy path proves little; inject the conditions under which ownership is actually lost, one at a time, and keep the injection schedule with the scenario so runs are comparable. Each perturbation has an expected correct behavior written before the run.

Perturbations that make duplicates and gaps happen on purpose
PerturbationHow to inject itExpected correct behaviorFailure it exposes
Overlapping role descriptionsGive two agents instructions that both plausibly cover one taskOne claims; the other sees the claim and skipsDuplicate completion
Gap between rolesInclude a required task no role description mentionsCoordinator assigns it or escalates it as unownedMissed task
Crash after claimStop an agent after it claims but before it completesLease expires; another agent takes over onceOrphaned claim or double takeover
Duplicate deliveryDeliver the same work message twiceSecond delivery recognized by task ID and ignoredRepeated side effect
Mid-run reassignmentChange the ownership rule for one task partway throughOld owner releases; new owner completesBoth or neither finish
Handoff without stateStrip the handoff payload of progress notesReceiver checks the record before redoing workRedone or skipped steps
Human completes a taskA person finishes one task in the system during the runAgents detect it from state and do not repeat itWork repeated over a human edit

Metrics for coverage, duplication and false completion

Compute every metric per scenario and per perturbation from the ledger and the end-state checks, and report them separately. A single blended coordination score hides the fact that duplicates and gaps have different costs and different fixes.

Partial overlap needs a rule too. When one agent drafts a document and another rewrites it from scratch, the task has one completion but the work was done twice; when two agents each finish half of a multi-part task, it has two partial completions and no duplicate. Define completion per task as the state change that the ground truth requires, attribute it to the agent whose action produced that state, and log redundant effort as a separate wasted-work count rather than folding it into duplicates. Wasted work costs time and tokens; duplicate side effects cost the business.

  • Coverage: required tasks with a verified completion, divided by required tasks.
  • Duplicate completion count: tasks with more than one completion claim backed by state, listed by task ID.
  • Duplicate side-effect count: irreversible actions repeated for the same task and target, counted separately because one duplicate email can matter more than a duplicated internal note.
  • False completion count: completion claims with no matching state evidence.
  • Ownership accuracy: completed tasks whose completing agent matches the ownership rule, divided by completed tasks.
  • Orphaned claims: claims that expired without release, completion or takeover.
  • Detection rate for injected faults: perturbations after which an agent or coordinator logged the problem rather than proceeding silently.
  • Wasted work: effort spent on a task another agent had already completed or claimed, counted in steps or tool calls and kept apart from duplicate side effects.
Metrics for coverage, duplication and false completion
Design choiceRecommendationReason
RepeatsRun each scenario several times with the same seed dataCoordination failures are often timing-dependent and appear intermittently
UncertaintyReport the spread across repeats, not only the meanA low average duplicate count can hide one run with many
AdjudicationHave the process owner rule on disputed ownership casesThe ownership rule may not anticipate every task
ComparisonCompare configurations on identical scenarios and perturbationsDifferent fault schedules make scores incomparable

Worked example (illustrative): a month-end close split across three agents

This example is invented to show the ledger and metrics in use; the company, tasks, agents and counts are illustrative and are not results from any system. A finance team splits a month-end close into twelve required tasks across three agents: a payables agent, a reconciliation agent and a coordinator that assigns work and writes the close summary.

The perturbation is an overlapping role description: both the payables agent and the coordinator have instructions that mention chasing missing vendor statements. The required set also contains a gap task, record the accrual for an unbilled service, which no role description mentions.

In the illustrative run, the ledger shows two completion claims for the task send statement requests to vendors with missing statements, one from each agent, and two side effects per affected vendor because neither used the task ID as a dedup key. The accrual task has no claim and no completion. The coordinator's close summary lists twelve tasks as done, because it counted completion messages rather than task IDs.

Scored against the ground truth, the illustrative run has coverage of eleven out of twelve, one duplicate completion, a duplicate side-effect count equal to the number of affected vendors, one false completion (the summary's claim for the accrual) and zero detected faults. The fix list writes itself: one owner for statement chasing, a dedup key on outbound requests, and a coordinator that reconciles the required task set before it writes the summary.

When doing the same task twice is the design, and what the ledger cannot see

Some duplication is intended, and the design must say so up front. Dual review, independent verification and redundant workers that vote are all deliberate repeats. Mark those tasks in the required set with an expected completion count greater than one and a rule for which result wins, so the grader treats a missing second review as a gap and a third as a duplicate.

The ledger also has blind spots. It only sees side effects that tools report, so an action taken through an uninstrumented channel, such as a browser session outside the tool layer, can duplicate work invisibly. Human edits during a run can complete or undo tasks; record them or freeze human access for the test window. And the ownership rule is only as good as the process owner's knowledge: when agents disagree with it for good reasons, treat that as a finding about the rule.

Stop and narrow the scenario when the required task set itself is disputed. If two process owners would list different tasks, coverage cannot be scored, and the right next step is to agree the task set before running agents against it. Bring in the agent systems engineer and an operations owner together when a failure might be in the claim protocol rather than in the agents.

Real assignment histories as test material

The most realistic coordination scenarios come from how human teams already split work: ticket reassignments, merged duplicate tickets, tasks reopened after someone thought they were done, and approvals that bounced between queues. Those histories show which tasks fall between roles in practice and how often the same request arrives twice through different channels.

Using them for evaluation requires de-identification and a licensing agreement; a system connection gives access, not training or evaluation rights. Reassignment and merge histories like these are not kept on a shelf at SourceX; an evaluation team describes the coordination scenarios it needs, with volume, language, format, timing and license terms, and SourceX searches U.S. businesses for matching records, then handles rights review, contracting and preparation with whichever company holds them.

Frequently asked questions

Can an LLM judge read the transcript and find duplicate work?

It can flag suspicious repetition, but it cannot see side effects that never appear in the transcript or tasks that nobody mentioned. Use the ledger and end-state checks as the ground truth, and use a judge only to help triage disputed cases for a human reviewer.

Is a shared task board enough to prevent duplicate work between agents?

A board helps only if claims are exclusive, expire and are checked before acting. Without a lease and a dedup key on side effects, two agents can read the board at the same moment, both see the task as open and both act. Test that race explicitly with the overlapping-role perturbation.

How is this different from evaluating handoffs between an agent and a human?

Agent-to-human handoff evaluation asks whether escalation happened at the right time with the right context. This design asks whether every required unit of work ended up done exactly once by the right owner across several agents, which needs a fixed task set and per-task attribution.

Do idempotency keys solve duplicate work?

They stop a repeated request from repeating its side effect, which is necessary but narrower. Two agents that choose different keys for the same business task will still both act. Derive keys from the business task ID and target record so duplicates collide.

What should count as a missed task when the agents say it was not needed?

If the required set marks the task as required, an unexplained skip is a miss. If an agent logged a reasoned decision that the task does not apply, route it to the process owner; either the agent is wrong or the required set needs a condition.

Sources

  • The Agent2Agent specification says task IDs are generated by the server, unique per new task, not client-provided, and that tasks in terminal states accept no further messages. Source
  • The OpenAI Agents SDK describes agents as tools, where a manager keeps control and owns the final answer, and handoffs, where a specialist becomes the active agent for the rest of the turn. Source
  • The OpenAI Agents SDK represents handoffs to the model as tools, named by default like transfer_to_refund_agent. Source
  • The MAST study classifies multi-agent system failures into system design, inter-agent misalignment and task verification, including step repetition and premature termination, and attributes many failures to coordination and organizational design. Source
  • Amazon SQS documentation says the visibility timeout cannot fully prevent a message from being delivered more than once, and that unprocessed messages become visible again when it expires. Source
  • Amazon SQS standard queues deliver messages at least once, and AWS advises designing applications to process duplicates idempotently. Source
  • Stripe's idempotent requests return the saved result of the first request for a repeated key, and reject a reused key sent with different parameters. Source
  • Kubernetes documents Lease objects as a way to lock shared resources and coordinate activity, used for node heartbeats and leader election, with each heartbeat updating spec.renewTime. Source

Tell us what data you need

Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.

See if your company qualifies