## TL;DR
When the allowlist stops syncing, the agent judges every message from scratch, and a borderline newsletter that scores just over the phish line gets flagged forever, once per run, with the agent learning nothing. Check the allowlist sync job first, restore it, and add a local verdict cache with a sensible lifetime for stable senders, so one human-approved decision survives even if the sync breaks again.

```text
agent loop detected: repeatedly flagging the same legit newsletter as phish after the allowlist sync failed
```

## Use this when
- The same newsletter issue is flagged as phish in run after run.
- An allowlist entry exists in the source system but the agent keeps flagging the sender.

## Not for this skill when
- The newsletter was spoofed in the flagged instance. Check authentication before allowing anything.
- The sender genuinely changed behaviour and now sends phishing-like content. Re-judging is correct.

## Steps
1. Verify the flagged messages authenticate as the real newsletter sender. Verify: spoofing is ruled out before any allow decision.
2. Check the allowlist sync job status and last successful run, and compare entry counts with the source. Verify: the sync failure is confirmed and timed.
3. Repair the sync cause and force a full refresh, then confirm the newsletter entry is present in the agent view. Verify: the entry is visible to the agent, not only in the source.
4. Add a verdict cache for allowlisted and repeatedly cleared senders, keyed by authenticated identity, with expiry and audit logging. Verify: a repeat message is cleared by cache with the reason logged.
5. Run the agent over the next newsletter issue. Verify: it passes with the cached decision and no duplicate alert is raised.

## Variant phrasings
### agent flags same newsletter allowlist sync failed
The allowlist sync variant.
### repeated false positive legit sender verdict cache agent
The verdict cache variant.

Compatibility: Agent allowlist stores and sync jobs, Defender tenant allow lists as a source system.

## Why it happens
An agent is only as good as its reference data feeds. Allowlist sync is a quiet background job whose failure presents as an intelligence failure in the agent, sending debugging effort to the model instead of the plumbing.

## Edge cases / pitfalls
- Key allow decisions on authenticated identity, never on display name or subject similarity.
- Sync jobs need the same monitoring as the agent itself; a stale allowlist is a production incident in slow motion.
- Cache clearances, not just blocks, or the agent relitigates every settled sender daily.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_XV45GTZkBXnyn1ZBmo08AA
