inbox-review

Morning inbox workflow -- multi-account scan, thread grouping, priority classification, draft replies

Inbox Review

Systematic morning inbox review with email-specific intelligence.

Multi-Account Handling

Always iterate ALL configured accounts, not just the default:

# List accounts first
messages(action="list_accounts")

# Then search each account
messages(action="search", query="UNSEEN", account="[email protected]")
messages(action="search", query="UNSEEN", account="[email protected]")

Never assume a single account. Users with EMAIL_CREDENTIALS containing multiple accounts expect all to be checked.

IMAP Search Syntax

Use proper IMAP search criteria -- these are NOT free-text queries:

IntentCorrect syntaxWrong (will fail or return wrong results)
Unread emailsUNSEENunread, is:unread
Since a dateSINCE 2026-03-20after:2026-03-20, date>2026-03-20
From a senderFROM [email protected]from:sender, [email protected]
Flagged/starredFLAGGEDstarred, is:starred
With subjectSUBJECT "meeting notes"subject:meeting
Combine criteriaUNSEEN SINCE 2026-03-20UNSEEN AND SINCE 2026-03-20 (no AND keyword)
Unread + fromUNSEEN FROM [email protected]UNSEEN AND FROM [email protected]

IMAP criteria are space-separated (implicit AND). There is no explicit AND/OR keyword in basic IMAP search.

Thread Grouping

Group messages by conversation, not individual emails:

  1. Fetch unread messages
  2. Group by Subject line (strip Re:, Fwd: prefixes, normalize whitespace)
  3. Within each thread, sort by date ascending
  4. Display thread with message count: "Meeting Q2 Planning (4 messages, latest from Alice 2h ago)"

This prevents showing 10 individual replies to the same thread as 10 separate items.

Priority Classification

Classify based on recipient role and sender signals:

SignalPriorityReasoning
You are in To: fieldAction RequiredDirect request to you
You are in CC: fieldFYIInformational, no action expected
Mailing list headers presentLowBulk/automated
Reply-To differs from FromLowLikely automated/newsletter
Known sender + To: you directlyHighPersonal direct message
noreply@, notifications@LowSystem notification

Output Format

Present results grouped by priority, not by account:

## Action Required (3)
- [work] "Q2 Budget Approval" from CFO (2h ago) -- needs your sign-off
- [work] "Code Review: PR #142" from Alice (5h ago) -- review requested
- [personal] "Lease Renewal" from landlord (1d ago) -- response needed

## FYI (5)
- [work] "Sprint Retro Notes" from PM (3h ago) -- CC'd, meeting summary
...

## Low Priority (12)
- [work] 8 newsletter/notification emails
- [personal] 4 promotional emails

For Action Required items, suggest one-line draft replies the user can approve or edit.

When to Use

  • Start of day inbox review
  • Catching up after time away from email
  • When inbox has accumulated many unread messages across accounts