## TL;DR
Three candidates and no decision rule is a design gap, not a hard problem. Give the agent a deterministic tie-breaker order: exact reference match first, then amount and date proximity, then vendor history recency, documented in configuration. When candidates still tie after the rules, the agent must escalate that invoice with all three candidates and their evidence presented, keeping the queue moving on everything else. A frozen queue is always worse than an escalated item.

```text
agent failed to break ties between three candidate invoices and froze the approval queue
```

## Use this when
- The approval queue stalls with invoices awaiting a decision between multiple candidates.
- Agent logs show repeated scoring with no winner emerging.
- The tied candidates look similar on amount and date, differing on references or history.

## Not for this skill when
- No candidates exist at all for the invoice. That is a missing-bill or no-match situation, not a tie.
- One candidate is clearly right on manual inspection; the scorer is just miscalibrated. Then fix the scoring weights, but the escalation path here still applies.

## Steps
1. Extract the stuck items and, for each, the candidate invoices with their scores and supporting fields. Verify: the ties are described from data, not from the freeze symptom
2. Define the tie-breaker order in configuration and apply it to the stuck items. Verify: each item resolves to one candidate or a declared tie under the documented rules
3. For declared ties, build the escalation payload: the invoice plus each candidate with its evidence fields and rule outcomes, routed to the human approver. Verify: the payload lets a human decide in minutes, not re-research
4. Release all non-tied items in the queue so the freeze does not hold everything hostage. Verify: queue throughput resumes while tied items await humans
5. Record the human decisions on tied items and use them to improve candidate generation or the tie-breaker order. Verify: recurring tie patterns shrink over time

## Variant phrasings
### agent cannot choose between candidate invoices tie approval queue frozen
The tie-freeze phrasing.
### invoice match tie breaker escalation human review
When defining the tie-breaker.

Compatibility: Agent invoice matching with multiple candidates feeding AP approval queues.

## Why it happens
Matching optimises for finding candidates; approval needs a single decision. When the pipeline offers a set where it promised a choice, and supplies no tie policy, the agent has no legitimate move and stalls, and the stall propagates to the whole queue because approvals are sequential. The tie-breaker is a policy decision the business should own: which evidence outranks which. Escalation is the honest handling of genuine ambiguity, and the recorded decisions become the training data that reduces future ties.

## Edge cases / pitfalls
- Ties cluster around vendors with duplicate invoice numbers or reused references; fixing vendor invoice-number discipline attacks the root.
- A tie that recurs identically across periods is a pattern the rules can learn; do not keep escalating the same case monthly.
- Approval SLAs should exempt escalated ties from the agent's own queue-time metrics, or the metrics punish the honest path.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_yyGZi-eSsod_dyLnnuhZzA
