---
title: "Check the recipient may still see the item · Agent Wranglers"
url: https://agentwranglers.se/playbook/notifications/channels-and-preferences/recheck-access-at-send
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Check the recipient may still see the item when you send

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Channels and preferences](https://agentwranglers.se/playbook/notifications/channels-and-preferences.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

- ID: NTF-36
- Level: Required
- Chapter: [Channels and preferences](https://agentwranglers.se/playbook/notifications/channels-and-preferences)
- Rule: Just before each send, check that the recipient may still open the item the notification is about. Drop the message when the check fails.
- Risk: Data leaked or lost
- Applies when: The project has user accounts.
- How: A digest, an escalation or a retry can run hours after the event. By then the recipient may have left the team or lost a role, or the item may be private or deleted. Queue the recipient ID and the item ID, never the rendered text. Run the same access check the item's own page runs, as [Check access to every object](https://agentwranglers.se/playbook/adversarial-testing/access-and-accounts/object-access) says. Then render the text. Pending sends follow a removal at once, as [Remove access when someone leaves](https://agentwranglers.se/playbook/accounts/organisations-and-teams/member-removal) describes. Digests read the same check, as in [Batch small updates into a digest](https://agentwranglers.se/playbook/notifications/channels-and-preferences/notification-digests).
- Check: A test queues a comment notification for member B, removes B from the organisation, then runs the send job. No push, text or email reaches the provider, and B's digest stays empty. A second test does the same after the item becomes private.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
export async function sendQueued(job) {
  const item = await items.find(job.itemId);
  if (!item || !(await canView(job.recipientId, item))) return { dropped: 'no-access' };
  return deliver(render(job.type, item, job.recipientId), job.recipientId);
}
```

### Python example

```python
def send_queued(job):
    item = items.find(job.item_id)
    if item is None or not can_view(job.recipient_id, item):
        return {"dropped": "no-access"}
    return deliver(render(job.type, item, job.recipient_id), job.recipient_id)
```

## Sources

- [OWASP Authorization Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html)

## Related rules

- [Check ownership on every record](https://agentwranglers.se/playbook/adversarial-testing/access-and-accounts/object-access) in Security testing
- [Remove access when someone leaves](https://agentwranglers.se/playbook/accounts/organisations-and-teams/member-removal) in Accounts
- [Batch small updates into a digest](https://agentwranglers.se/playbook/notifications/channels-and-preferences/notification-digests) in Notifications

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/notifications/channels-and-preferences/recheck-access-at-send">Agent Wranglers notifications playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Never text or push customers from test systems](https://agentwranglers.se/playbook/notifications/channels-and-preferences/test-notification-sinks)
- Next: [Write each notification in the recipient's language](https://agentwranglers.se/playbook/notifications/channels-and-preferences/recipient-language)
- [Channels and preferences](https://agentwranglers.se/playbook/notifications/channels-and-preferences)
