GuideUpdated November 11, 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]
Contents
- What a clean inbox looks like afterwards
- Prerequisites
- Settings that decide what the agent can do
- Step by step: clean up your inbox with an agent
- How rules behave on each level
- Did it work?
- Troubleshooting common problems
- When a different tool fits better
- Next steps
- Sources and status
- Frequently asked questions
- 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, install the official Command Mail plugin from the plugin directory; availability depends on your plan, workspace, role and region.[10][11] 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.
| Setting | Effect during cleanup | Where to find it |
|---|---|---|
mail:read only, no mail:send | Reading, search, proposals, labels and rules work; direct Trash, restore and permanent-deletion calls are refused, but active rules can still move mail to Trash | Authorization page when connecting |
| Suggest level | The agent's archive, spam and folder moves wait for you, and so do agent rules; your own switched-on rules act | Automation & rules → How much may your agent do? |
| Empty Spam and Trash: Never | No scheduled permanent deletion | Automation & rules → Empty Spam and Trash |
| Always protected | When a spam or trash rule matches a message recognized as an invoice, payment problem, deadline, appointment, security notice, request for action or personal mail, the match becomes a suggestion; for disguised phishing identified with certainty, five of these protections are dropped | Automation & 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.
- In Command Mail, open
Automation & rulesin the sidebar. Under “How much may your agent do?”, set every mailbox toSuggest, including the rowCatch-all, which applies to mail for addresses without their own setting. New mailboxes already start onSuggest(onRead onlyif that row is set to it); mailboxes connected earlier keep their level. - On the same page, under
Empty Spam and Trash, make sure both fields readNever. The hint text there states that a set period deletes for good and cannot be undone. - Connect your agent to
https://commandmail.app/mcpand leave onlymail:readticked on the authorization page. For Claude Code the command isclaude mcp add --transport http commandmail https://commandmail.app/mcp.[1] - 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
capabilitiesfirst and can tell you each mailbox's level. If it does not saysuggest, go back to step 1. - 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. - Open
Activityin the sidebar and the tabWaiting for you. For each suggestion chooseApplyorKeep as is. A suggestion for a whole group appears as one entry with the number of messages. Its subject, sender andOpenbutton 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. - 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→Rulesit shows how many open messages it would match today, andSwitch onactivates it. From then on it is yours and acts on new mail without asking, even onSuggest, unless protection reasons or a spam decision prevent it; switch it on only once the match count looks right. - 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
Your own switched-on rules already act on Suggest. According to the app code, a rule belongs to you if you created it or were the last to switch it on. This includes a proposed agent rule once you switch it on. Your own spam marks also learn or activate a spam rule.
Unless protection reasons or a higher-priority spam decision prevent it, Command Mail applies matching rules to new mail without asking and logs the change. You can undo it under Activity.
Agent rules remain suggestions on Suggest. If an agent changes one of your rules, it counts as the agent's afterwards. To review a rule first, leave it switched off and check in the rule list how many open messages it would match today.
On Confirmed rules, switched-on rules act on new mail without asking, the agent's too, with the same protection reasons; the agent's direct 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] Whether an AI can unsubscribe for you at all is covered in Can AI unsubscribe you from emails? A price comparison of the unsubscribe services available in Europe is in Clearing out newsletters safely in Europe.
09Next steps
Stay on Suggest for a few days and notice which suggestions you apply almost every time. Those become rules you switch on, and they already act on this level. You need Confirmed rules when agent rules should also act without you switching them on, or when the agent should apply active rules to existing mail. 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, ChatGPT plugin details as of 2026-10-28, Command Mail rule behavior corrected on 2026-11-11. Vendor help pages and Command Mail's public pages were retrieved on 2026-10-19, the plugin page and OpenAI's plugin help on 2026-10-28. 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.
Corrected on 2026-11-11 and checked against the app code at commit 60c8c3d: this guide said a rule you switched on does not act alone on Suggest and that its matches also become suggestions. In the reviewed app code, your own switched-on rules already act there; only rules and actions by agents remain suggestions. We also clarified the protection rules: protection reasons can turn rule matches into suggestions. Archive and folder rules may file an explicitly named protected kind when no other blocking protection remains. Disguised phishing identified with certainty loses five protection reasons.
Frequently asked questions
Can an AI agent delete my email by accident while cleaning up?
Not directly if it only has mail:read. In Command Mail, moving to Trash directly, restoring, permanent deletion and emptying Spam or Trash all require mail:send as well. Rules are separate: on Confirmed rules and Limited filing an agent with mail:read can switch on a Trash rule. Without mail:send an agent cannot switch on automatic deletion, but an existing period removes Spam and Trash even without its send permission. Set Empty Spam and Trash to Never and no schedule removes anything.
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
- Command Mail: Documentation (connect an agent, autonomy, activity log)
- Command Mail: Permissions and autonomy
- Command Mail: Plans and agent permissions
- Command Mail: Organizing guide for agents
- Google: Create rules to filter your emails
- Google: Manage your subscriptions in Gmail
- Anthropic: Use Google Workspace connectors
- Clean Email: Unsubscriber and Auto Clean
- Leave Me Alone: unsubscribe from newsletters
- ChatGPT: Command Mail plugin
- OpenAI Help Center: Plugins in ChatGPT