The Desktop

One terminal. Three panes. Two Claudes. No special connectors required.

← All posts

Update, April 2026: This page originally used MailDrop and Outlook. The layout has evolved. Apple Mail replaces both — Claude reads and sends mail directly via AppleScript. No intermediary app. No drag-and-drop. No file conversion. MailDrop is still available for Outlook users, but if you have Apple Mail, you don't need it.

The problem everyone has

Your AI can read files, write code, search the web, and query databases. It cannot read your email.

There's a protocol called MCP (Model Context Protocol) that lets AI tools connect directly to other software — databases, calendars, file systems. Think of it as a universal adapter between AI and everything else. Most email clients don't have one. Your AI is brilliant and your inbox is a black box.

But Apple Mail exposes itself to AppleScript — a simple automation language built into every Mac. Your AI can write AppleScript. Which means your AI can read, search, compose, and send email without any special connector at all.

You could wait for Microsoft or Google to build an official AI connector. Or you could use what already works.

The layout

iTerm2 — floats across all desktops Claude Code session 1 youplus site mail + communication Claude Code session 2 DO tickets snowflake analysis zsh + Sublime Text bill@mini ~/persona $ subl outbox/tunnel.md bill@mini ~/persona $ git status bill@mini ~/persona $ sqlite3 archive/maildrop.db edit .md files, git, archive search no AI here — just a shell Finder OneDrive maildrop/ inbox/ outbox/ archive/ templates/ persona/ workspace/ Calendar April 17 Bi-Weekly Check-In Timesheet Dr Ryba 12:00 Teams Gautam Sylvia Wendy Ali semantic search POC archive attached ^^^ same. Type a message Apple Mail All Inboxes Exchange iCloud Gmail Drafts Sent always here — floats across desktops communication station

The left half is a terminal — a text-based window where you type commands and talk to AI. The app is called iTerm2, a popular terminal for Mac.

It's set to "float," meaning it stays visible on every macOS virtual desktop. macOS lets you create multiple desktops — separate workspaces you swipe between with a three-finger swipe on your trackpad, or by pressing Control + Left/Right arrow. To set this up on any Mac app: right-click the app's icon in the Dock, go to Options, and choose All Desktops. For iTerm2 specifically, you can also set it in Profiles → Window → Space → All Spaces.

Multiple desktops, one AI

The terminal follows you everywhere. The right half changes depending on the job. I use three desktops:

The AI is the same in every desktop. I don't close it and reopen it when I switch tasks. I don't start a new conversation and re-explain who I am and what I'm working on. The context stays loaded. When I swipe from communication to editing, the terminal is already there with everything it knew five minutes ago.

This is why the floating terminal matters. Without it, every desktop switch is a reintroduction meeting — "Hi, I'm Bill, here's what I'm doing, here's what I need." With it, you pick up mid-sentence. The AI remembers. You just change the scenery.

The left half: always the same

iTerm2 Claude Code session 1 current project Claude Code session 2 different context zsh (plain command line) $ subl outbox/tunnel.md $ git status $ sqlite3 archive/maildrop.db no AI here — just commands

Two Claude Code sessions side by side on top. One plain shell on the bottom.

Two AIs and a command line. That's the whole left half.

The right half: the communication station

Finder maildrop/ inbox/ outbox/ tunnel.md forge.md archive/ templates/ tunnel.md pulse.md Calendar Thu, Apr 17 Bi-Weekly Check-In Timesheet Dr Ryba 12:00 Teams Gautam Sylvia Wendy Ali semantic search POC archive attached Type a message Apple Mail All Inboxes Exchange iCloud Gmail Drafts Sent

Four windows in a 2×2 grid:

The flow

Apple Mail email arrives AppleScript Claude reads + drafts .md file You edit in Sublime AppleScript Apple Mail sends

An email arrives. You see it in Apple Mail. It needs a real response — not a thumbs-up, an actual answer with thought behind it.

  1. Tell Claude: "Read my latest unread email and draft a response."
  2. Claude reads it directly from Apple Mail via AppleScript. No drag, no file conversion, no clipboard. It strips the signatures and noise and saves a clean markdown draft in the outbox.
  3. The file appears in Finder. Open it in Sublime Text (or any editor). Add your personal notes, adjust the tone, write the parts only you can write.
  4. Tell Claude: "Send it." Claude reads your edited file, composes the email via AppleScript, and sends it from the right account.
  5. The markdown gets archived — file moved to the archive, full-text indexed in a SQLite database. Searchable forever.

Total time: maybe two minutes for an email that would have taken fifteen. And zero context switches — you never left the terminal.

The AppleScript bridge

Here's what's actually happening under the hood. Claude writes small AppleScript commands and runs them in your terminal. You don't need to know AppleScript — Claude does. But if you're curious, here's what the basic operations look like:

Read unread messages:

-- List unread messages from all accounts
tell application "Mail"
  set msgs to (messages of inbox whose read status is false)
  repeat with m in msgs
    log (sender of m) & " | " & (subject of m)
  end repeat
end tell

Read a specific email's body:

tell application "Mail"
  set m to message 1 of inbox
  log (sender of m) & " | " & (subject of m)
  log (content of m)
end tell

Send an email:

tell application "Mail"
  set newMsg to make new outgoing message with properties {subject:"Re: Project Update", content:"...", visible:false}
  tell newMsg
    set sender to "you@example.com"
    make new to recipient with properties {address:"them@example.com"}
  end tell
  send newMsg
end tell

Attach a file:

-- Add a markdown attachment to the outgoing message
tell newMsg
  make new attachment with properties {file name:POSIX file "/path/to/response.md"}
end tell

That's it. No API keys. No OAuth tokens. No cloud service. AppleScript talks to Apple Mail the same way you do — through the app's own interface. macOS asks permission once ("Allow iTerm to control Mail?") and then it just works.

The only requirement: macOS with Apple Mail. If you're on Windows or using Outlook exclusively, see the MailDrop approach below — it solves the same problem with a file-based bridge instead.

Why two Claudes

Context is expensive. Not in computing cost — in your head.

You're deep in a database investigation and an email arrives that needs a thoughtful response. You have two choices: blow up your current conversation or ignore the email.

With two sessions, you handle the email in session 1 and go back to session 2 without losing a single thought. Both Claudes remember where they were.

This is the same principle as the Tunnel — don't let the transport destroy the content. Two conversations, two contexts, zero interference.

What this replaces

the old way — 7 switches Outlook copy browser paste wait copy Outlook the new way — 0 switches Claude + Apple Mail reads, drafts, sends via AppleScript edit You review + approve

The old way: Outlook full-screen, switch to ChatGPT in a browser, copy-paste an email into a text box, wait, copy-paste back, switch again, lose your place, repeat. Seven context switches per email.

This layout has zero. Claude reads the email, writes the draft, and sends it — all from the terminal. The only human step is reviewing the draft in a text editor and saying "send it."

No special connector required

Apple Mail email arrives AppleScript read → draft → send Claude writes the scripts Apple Mail email sends

AppleScript is built into every Mac. Apple Mail exposes its full interface to it — read messages, search, compose, send, manage folders, save attachments. Claude Code can run AppleScript commands via the terminal. The only setup is a one-time macOS permission: System Settings → Privacy & Security → Automation → allow your terminal to control Mail.

No API keys. No MCP server. No third-party app. No cloud. The bridge is the operating system itself.

The archive

Every email Claude processes and every pattern file you generate gets copied into an archive organized by year and month:

archive/
  2026/
    04/
      TID_20260414_366096_TUNNEL_sylvia-4xl-cost.md
      TID_20260413_103958_FORGE_ali-gift.md
      TID_20260414_095703_TUNNEL_sandbox-resourcing-inbound.md
      ...

Two naming conventions. Processed emails use a timestamp and the slugified subject line:

YYYYMMDD-HHMMSS_slugified-subject.md

Pattern files — Tunnels, Pulses, Forges, Senates — use a thread ID that stays consistent across the entire conversation:

TID_YYYYMMDD_RANDOM_PATTERN_topic-slug.md

The TID goes in the email subject line. Any AI on any end of the thread can search for that ID and reconstruct the full history from the files alone. The random number ensures uniqueness. The pattern name tells you (and any AI reading the file) what kind of communication it is — a Tunnel, a Forge, a Pulse, or a Senate. The slug is human-readable so you can scan a folder and know what's what.

Next to the archive sits a SQLite database with a full-text search index. Every archived file — subject, sender, date, body — gets indexed the moment it's archived. SQLite is a database engine built into every Mac, every iPhone, every Linux server. It doesn't need a server. It doesn't need the internet. It's a single file on your disk.

The search index uses FTS5 — SQLite's full-text search engine. It's the same technology that powers search in Apple Mail, Firefox history, and countless mobile apps. One query, ranked results, instant.

$ sqlite3 archive/maildrop.db "SELECT filename, snippet(emails,5,'>>>','<<<','...',30) FROM emails WHERE emails MATCH 'warehouse sizing' LIMIT 3;"

1. TID_20260414_366096_TUNNEL_sylvia-4xl-cost.md
...pointed 1,024 threads at SHOW OBJECTS. That's a >>>freight train carrying a sandwich<<<...

2. TID_20260414_095703_TUNNEL_sandbox-resourcing-inbound.md
...>>>Gatekeeper<<< was designed to reduce the operational burden...

Compare this to Outlook search. Outlook searches through HTML formatting artifacts, nested reply chains, legal disclaimers, and signature blocks. It finds the word you searched for buried inside markup you never wrote. It returns forty threads with the same subject line. You scroll. You guess. You give up and ask someone.

The archive searches clean markdown. No noise. No formatting soup. The text that went in is the text that comes back. One command, one answer.

Six months from now, someone asks "what did we decide about Sandbox resourcing?" You don't open Outlook. You don't scroll through threads. You tell Claude to search the archive. Same result, in under a second.

The archive is just files on disk. The index is just a database on disk. No cloud. No subscription. No server. If you want to move it, copy the folder. If you want to back it up, it's already in your normal backup. If you want an AI to read your entire communication history and synthesize a brief, point it at the archive directory. Every file is clean, structured, and readable.

Build your own

You don't need my exact setup. You need the principle:

What if I don't use Apple Mail?

The AppleScript approach works with Apple Mail on any Mac. If you're on Windows or use Outlook exclusively, the original version of this workflow used MailDrop — a free desktop app that converts Outlook emails into clean markdown files via drag-and-drop. It still works and it's still available.

Not a Claude Code user? Swap the left half.

The left half of this layout is iTerm2 with Claude Code. That's what I use. But the pattern works with any AI that can read files from your computer. Here's how the left half changes depending on your tool:

Claude Desktop (Anthropic's desktop app) — open two windows side by side. Each one is a separate conversation. You can drag files into the window or point Claude at your outbox folder. No terminal required. Free.

ChatGPT desktop app (OpenAI) — same idea. Two windows, two conversations. ChatGPT can read files you upload or drag in. The flow works the same way — your AI reads the clean markdown file and drafts a response.

GitHub Copilot in VS Code — the AI lives inside your code editor, and VS Code has a built-in terminal. Two VS Code windows side by side gives you two AI contexts plus a command line in each. Good if you're already a VS Code user.

Cursor — an AI-first code editor. Similar to VS Code with Copilot, but the AI is more deeply integrated. Two Cursor windows gives you the same two-context pattern.

Any AI in a browser (Claude.ai, ChatGPT, Gemini) — this works, but you lose the key advantage. Browser-based AI can't read files from your computer or run AppleScript, so you're back to copy-pasting. It still beats the old workflow, but you add steps that the desktop apps eliminate.

The right half stays the same no matter what AI you choose. The bridge is AppleScript on Mac, or the file system everywhere else. Any AI that can run a command or read a file can cross it.

← Back to posts

Disclosure: This page was generated by Claude (Anthropic) under Bill's direction. The desktop layout, the floating terminal pattern, the two-Claude approach, and the AppleScript integration are Bill's ideas. Claude wrote the prose and the SVG diagrams.