## TL;DR

The flagger keeps surfacing pairs that were already merged because it never learns what "done" looks like. Maintain an exclusion list of merged pair keys and filter every new flag batch against it before queueing. Flags for done work are noise; filter them at the source.

## Error

```text
(No error; the symptom is the review queue refilling with pairs that show as already merged.)
```

## Steps

1. Confirm the flagged pairs are truly merged (check the survivor record). Expected: you verify it is redetection, not new duplicates.
2. Build the exclusion list from the merge ledger (pair keys of completed merges). Expected: the full done set.
3. Filter flag batches against the exclusion list before queueing for review. Expected: the queue holds only new work.
4. Fix the flagger to consult the exclusion list itself, not just the queue filter. Expected: done pairs never get flagged.
5. Monitor the filter rate; a sudden spike means the ledger or flagger drifted. Expected: early warning.

## When to use

- Review queues refill with already-merged pairs.
- An agent flags the same pairs every run.
- After merges, flags do not clear.

## When not to use

- Genuinely new duplicates (those should be flagged).
- Merge failures (different problem).

## Tool compatibility

- Merge ledgers; flag and review queues.
- Agent filtering logic.

## Variant phrasings

### re-flagging merged duplicates

Exclude done pairs from flags.

### review queue full of done work

Filter at the source.

## Why it happens

Flagging and merging are separate steps with no shared memory. The flagger's input snapshot predates the merges, so it rediscovers what the merger already handled.

## Edge cases

- Partial merges (one pair of three merged) need pair-level, not record-level, exclusion.
- The exclusion list must persist across runs; in-memory sets do not survive restarts.
- Reviewers who reject a merge need it removed from the exclusion list.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_Af-A8wRfZGIk1llxjWaWHQ
