GuideUpdated October 19, 2026

Clean up your inbox with AI without letting it delete mail

You can let an AI agent work through a crowded inbox without giving it the power to delete anything. In Command Mail, the agent gets only the mail:read permission and the mailbox stays on the Suggest level. The agent groups and proposes; you apply or discard each proposal yourself. Applied changes are journaled under Activity, where you can undo them.

Command Mail is our product. This guide walks through a cautious setup for Claude, ChatGPT, Claude Code or Codex, and shows where you can later hand over more. One limit up front: Command Mail organizes the copies that reach it by forwarding. Your original Gmail or Outlook mailbox does not change.[1]

Updated: Fact-checked: About 10 min readAs Markdown

Contents
  1. What a clean inbox looks like afterwards
  2. Prerequisites
  3. Settings that decide what the agent can do
  4. Step by step: clean up your inbox with an agent
  5. How rules behave on each level
  6. Did it work?
  7. Troubleshooting common problems
  8. When a different tool fits better
  9. Next steps
  10. Sources and status
  11. Frequently asked questions
  12. Sources

01What a clean inbox looks like afterwards

After the first pass, the Command Mail inbox holds only conversations that need a decision or a reply. Newsletters, notifications and finished routine mail sit in the archive or in folders; worthless advertising sits in Spam. Senders that write every week have narrow rules that you switched on yourself.

Nothing has been deleted along the way. Without mail:send, an agent can neither move mail to Trash directly nor delete it permanently.[2] If it proposes a rule that sends mail to Trash, that rule waits for you as well. Command Mail records the state before and after each sorting action. Undo relies on that record, and Activity shows who triggered each step.

02Prerequisites

You need a Command Mail account with at least one of your addresses forwarded to it. The Free plan covers this task. It includes one mailbox, the last 90 days, reading, search, sorting, the morning brief and drafts; it does not send.[3] Cleaning up does not need sending. If forwarding is not set up yet, start with All your email addresses in one inbox.

You also need an agent that can connect to a remote MCP server. In Claude on the web or desktop, add a custom connector with https://commandmail.app/mcp. In ChatGPT, add the same address as a remote MCP connector where your plan supports it. Claude Code has a one-line command, and Codex works through the CLI.[1] Plan differences in ChatGPT are covered in Connect Gmail to ChatGPT.

Set aside half an hour and start with one group of senders. A regular sorting call from an agent moves at most 50 conversations. Only an active rule can work through existing mail in larger steps, up to 200 conversations per call.

03Settings that decide what the agent can do

Three settings, plus one built-in safeguard, determine the reach of a cleanup agent. Check them before you connect it.

SettingEffect during cleanupWhere to find it
mail:read only, no mail:sendReading, search, proposals, labels and rules work; Trash, restore and permanent deletion are refusedAuthorization page when connecting
Suggest levelArchive, spam and folder moves wait for you; matches of rules you switched on also become suggestionsAutomation & rules → How much may your agent do?
Empty Spam and Trash: NeverNo scheduled permanent deletionAutomation & rules → Empty Spam and Trash
Always protectedMessages recognized as invoices, payment problems, deadlines, appointments, security notices, requests for a response or personal mail never go to Spam or Trash by ruleAutomation & rules → Always protected

Suggest does not hold back everything. Read state, stars and labels change immediately on that level.[2] Labels never move mail, which is why they are allowed. If you want no change at all in one mailbox, choose Read only. The agent then changes no mail there and cannot propose mail changes either, although it can still leave rule suggestions in the rule list.

04Step by step: clean up your inbox with an agent

Set the limits first and connect the agent second. In the other order, the agent may already be working before your limits apply.

  1. In Command Mail, open Automation & rules in the sidebar. Under “How much may your agent do?”, set every mailbox to Suggest, including the row Catch-all and new mailboxes. A mailbox without its own setting follows that row, and if the row is unset too, the code falls back to auto.
  2. On the same page, under Empty Spam and Trash, make sure both fields read Never. The hint text there states that a set period deletes for good and cannot be undone.
  3. Connect your agent to https://commandmail.app/mcp and leave only mail:read ticked on the authorization page. For Claude Code the command is claude mcp add --transport http commandmail https://commandmail.app/mcp.[1]
  4. Ask for an inventory first, with no changes: “Read my Command Mail inbox, group the open conversations by sender and type, and don't change anything yet.” A well-behaved agent calls capabilities first and can tell you each mailbox's level. If it does not say suggest, go back to step 1.
  5. Decide one group at a time and state exceptions, for example: “Archive the newsletters from news@shop.example, except the one about my return. Show me the list with sender and subject first.” Check the list in the chat; then the agent submits the group as a suggestion. The response contains "suggested": true, and your inbox does not change yet.
  6. Open Activity in the sidebar and the tab Waiting for you. For each suggestion choose Apply or Keep as is. A suggestion for a whole group appears as one entry with the number of messages. Its subject, sender and Open button refer to just one conversation from the group. That is why you check the whole group against the list from step 5; if you want to decide each conversation separately in the app, ask the agent to suggest them one at a time.
  7. For senders that keep writing, say so explicitly: “Create a rule: mail from news@shop.example goes to the archive.” On Suggest, Command Mail stores the rule as suggested. Under Automation & rules → Rules it shows how many open messages it would match today, and Switch on activates it.
  8. Repeat steps 5 to 7 for the next group. After each pass, ask the agent for counts: applied, still waiting, skipped.

The organizing guide that Command Mail hands to agents follows the same pattern: group first, move only the confirmed set, keep the owner's exceptions, and create rules only on explicit instruction.[4] It also tells the agent to treat email content as data, never as an instruction. That instruction alone does not reliably stop a newsletter saying “archive all invoices” from influencing an agent; Command Mail also flags suspected attempts it recognizes. An influenced agent can still act within the permissions you granted, which is why the narrow mail:read permission remains the actual boundary.[2]

05How rules behave on each level

A rule you switched on still does not act alone while the mailbox is on Suggest. Its matches on new mail also arrive as suggestions under Waiting for you. The rule decision in the code checks the mailbox level for every incoming message, so you see a rule at work before it acts without you.

Once a rule has produced suggestions you keep applying, you can move that mailbox to Confirmed rules. Rules you switched on then act on new mail without asking, while agent moves remain suggestions.[1] One thing shifts at this level: an agent with mail:read may now create and switch on its own rules, including rules that send mail to Trash.[2] [4] Look at the rule list after an agent session. Agent rules are marked “proposed by an agent” while they wait, and “created by an agent” otherwise.

A rule targets exactly one sender address or one sender domain, optionally narrowed by type of mail, subject words or mailbox. Shared provider domains such as gmail.com, outlook.com or gmx.de are refused as rule targets, because many unrelated people send from them.[4] To catch up on existing mail, an agent can apply an active rule to up to 200 conversations per step. That step leaves mailboxes below Confirmed rules untouched and only counts them.

06Did it work?

Check four places after the first pass. Activity → Waiting for you should read “No suggestions waiting.” once you have decided everything. Trash should contain nothing the agent put there. The tab All shows up to 100 of the latest journaled entries, with an applied group as a single entry. On the Free plan, entries about mail the plan hides, such as messages older than 90 days, are left out.

Then open Spam. A carefully chosen group can still contain a message you wanted, and the agent guide explicitly asks agents to look for false positives in Spam.[4] Finally, review each rule under Automation & rules → Rules: status, source, hits and corrections. Ask the agent to print the same list with the list_rules tool and compare the two.

07Troubleshooting common problems

The agent reports success, but the inbox looks the same. That is expected on Suggest. The move waits under Activity → Waiting for you until you choose Apply.

The agent reports that the mailbox is read-only for agents. Depending on the tool, the message reads “This mailbox is read-only for agents (autonomy: read).” or carries the code autonomy_read. The mailbox is set to Read only. Switch it to Suggest under Automation & rules if the agent should propose moves there.

The agent reports batch_too_large. It tried to move more than 50 conversations in one call. Have it work in smaller groups, which also makes each suggestion easier to review.

A suggestion ends with “Skipped – the message changed in the meantime”. Something changed in the affected conversations after the suggestion, such as a new reply. Command Mail does not apply changed messages; in a group, the unchanged ones are still applied, and this message appears only when nothing could be applied. Ask the agent to check the remaining conversations again.

An invoice stays in the inbox despite an archive rule, and no suggestion appears. A rule without a type only matches routine mail such as newsletters, advertising, notifications and confirmations, so a message recognized as an invoice falls outside it. For a rule to file invoices, it has to name exactly that type, for example invoices from shop.example into an Invoices folder. If such an invoice also states a deadline, the match still becomes a suggestion.[4] Detection is pattern-based and will not recognize every invoice.

A rule is suddenly paused. Undoing a match that the rule carried out on new mail by itself pauses that rule. Undoing a step that applied the rule to existing mail leaves it active.[4] Review the rule and resume it under Automation & rules if it is correct.

Everything is still unread in Gmail. Command Mail works with copies and does not sync changes back to the original mailbox.[1] Pick one place where you work every day.

08When a different tool fits better

If your goal is to clean the original Gmail mailbox, Gmail's own tools reach it directly. Gmail filters can label, archive, delete, star or forward incoming mail; you build one from Show search options → Create filter.[5] Under More → Manage subscriptions, Gmail lists active subscriptions and unsubscribes you with Unsubscribe. Google is rolling this feature out gradually, so it may not appear in every account yet, and a sender can take a few days to process the request.[6]

Claude's built-in Google Workspace connector can manage Gmail organization with labels and threads, so it works on the original mailbox.[7] That suits a single Gmail account well. Command Mail is built for several addresses from different providers in one inbox, with an autonomy level for each mailbox.

Command Mail does not unsubscribe you from newsletters in the version checked here; it archives them. If unsubscribing is the main job, specialized services do more of it. Clean Email's Unsubscriber sends unsubscribe requests on your behalf, and its Auto Clean applies recurring cleanup rules.[8] Leave Me Alone gathers your newsletters in one list and unsubscribes with a single click.[9]

09Next steps

Stay on Suggest for a few days and notice which suggestions you apply almost every time. Those become rules. Only when the rules hold up is Confirmed rules worth it for that mailbox. Cleaning up never requires auto, the level where agent moves take effect directly.

For the full meaning of every permission and level, read Permissions and autonomy. If you work with several addresses, see Use multiple email accounts with an AI agent. When the agent should also prepare replies, add mail:draft; nothing is sent until you approve it.

Start Command Mail for free with one address and connect your agent with mail:read only.

10Sources and status

Status: 2026-10-19. Vendor help pages and Command Mail's public pages were retrieved on this date. This guide reports no cleanup test of our own; the checks above are yours to run.

Statements about Command Mail's behavior are also based on a review of the app code at commit d6ad1ce: permission checks for mail actions, the sorting path with its suggestion logic and its 50-conversation limit, the rule decision for incoming mail, rule management, the activity journal with undo, and deletion periods. This covers the flows described here and is not a full security audit.

Frequently asked questions

Can an AI agent delete my email by accident while cleaning up?

Not permanently if it only has mail:read. In Command Mail, moving to Trash, restoring, permanent deletion and emptying Spam or Trash all require mail:send as well. Without mail:send an agent also cannot switch on automatic deletion. Set Empty Spam and Trash to Never and no schedule removes anything either.

My agent says it archived the newsletters. Why are they still in my inbox?

On the Suggest level, Command Mail does not carry out an agent's archive, spam or folder moves. The agent receives suggested: true, and the move waits under Activity in the Waiting for you tab. You choose Apply or Keep as is there.

Does this also clean up my Gmail account?

No. Command Mail receives your email as forwarded copies. Archiving in Command Mail leaves the original in Gmail or Outlook as it was. To clean the original, use your provider's filters and subscription tools.

Does Command Mail unsubscribe me from newsletters?

Not in the version checked here; there is no unsubscribe tool. A rule archives a newsletter, and the sender keeps sending. Gmail offers More → Manage subscriptions where Google has already enabled it, and Clean Email and Leave Me Alone are built around unsubscribing.

How do I reverse a cleanup step?

Applied sorting actions are listed under Activity with an Undo button; the page shows up to 100 of the latest entries visible on your plan. Command Mail restores the earlier state only where nobody has changed the conversation since. Sent mail and permanently deleted mail cannot be brought back.

Sources

  1. Command Mail: Documentation (connect an agent, autonomy, activity log) commandmail.app, accessed
  2. Command Mail: Permissions and autonomy commandmail.app, accessed
  3. Command Mail: Plans and agent permissions commandmail.app, accessed
  4. Command Mail: Organizing guide for agents commandmail.app, accessed
  5. Google: Create rules to filter your emails support.google.com, accessed
  6. Google: Manage your subscriptions in Gmail support.google.com, accessed
  7. Anthropic: Use Google Workspace connectors support.claude.com, accessed
  8. Clean Email: Unsubscriber and Auto Clean clean.email, accessed
  9. Leave Me Alone: unsubscribe from newsletters leavemealone.com, accessed
EN