# Removals · only when allowed

Each archive or removal takes two calls: a preview that changes nothing, then a confirmation with the person's own words. The server enforces both steps.

Checked 2026-12-02 · https://xale.app/docs/ai/removals-only-when-allowed

## Two steps, enforced

**1. Preview.** [`xale_prepare_removal`](https://xale.app/docs/ai/tools/xale_prepare_removal) with an `action` and the item's `id` returns:

```json
{
  "status": "needs_confirmation",
  "removalId": "…",
  "preview": "Archive the Task \"Book the venue\", so it moves out of your active Tasks and keeps its links. It can be unarchived in Xale.",
  "expiresInMinutes": 30,
  "standingConfirmation": false,
  "nextStep": "Nothing has been removed. Tell the person exactly what this would remove and ask them to confirm. Only when they clearly say yes, call xale_confirm_removal with this removalId and their words in personSaid. If they say no, do nothing."
}
```

Nothing changes yet. Show the person the `preview`.

**2. Confirm.** After a clear yes, [`xale_confirm_removal`](https://xale.app/docs/ai/tools/xale_confirm_removal) with the `removalId` and their words, quoted exactly, in `personSaid` (2–500 characters). Then say the `tellThePerson` sentence.

## What the server checks

| Check | Refusal |
| --- | --- |
| No `personSaid` and no standing yes | "Ask the person first, then send their words in personSaid. (Or, if they want you to stop asking each time, record that with xale_allow_removals.)" |
| During an unattended run | "Not during an unattended run. Removals happen only while the person is in the chat and has said yes." |
| Older than 30 minutes | "That preview expired after 30 minutes. Prepare it again with xale_prepare_removal and confirm with the person." |
| The item changed since the preview | "Nothing was removed: it changed after the preview. Prepare it again, show the person the new preview, and ask again." |

A removal does exactly what was previewed, or nothing.

## Prefer archiving

The tool says "prefer archiving: it can be undone". Archiving a Task, Milestone, Mindmap, Note, List, Meeting or Habit can be unarchived in Xale. A Capture goes to Trash and can be restored there. `delete_mindmap_branch` removes the node and everything under it for good.

## A standing yes

Only when the person tells you that you may remove things without asking each time, record their words with [`xale_allow_removals`](https://xale.app/docs/ai/tools/xale_allow_removals). You still preview each removal and tell them what you removed. Settings › Connected apps shows it, with their words and an **Ask me each time** button; [`xale_stop_allowing_removals`](https://xale.app/docs/ai/tools/xale_stop_allowing_removals) turns it off from the chat.

## Related

- For people: [How do I let Claude remove things in Xale?](https://xale.app/help/removals-by-ai-how-to-allow)
- For people: [How do I restore deleted notes in Xale?](https://xale.app/help/trash-restore-deleted-items)
- Tools: [xale_prepare_removal](https://xale.app/docs/ai/tools/xale_prepare_removal)
- Tools: [xale_confirm_removal](https://xale.app/docs/ai/tools/xale_confirm_removal)
- Tools: [xale_allow_removals](https://xale.app/docs/ai/tools/xale_allow_removals)
- Tools: [xale_stop_allowing_removals](https://xale.app/docs/ai/tools/xale_stop_allowing_removals)
- Read next: [Trash and removal · what's kept](https://xale.app/docs/ai/trash-and-removal-what-s-kept)
- Read next: [Undo-friendly writes · small steps](https://xale.app/docs/ai/undo-friendly-writes-small-steps)
