Skip to content
Maxwell CollinsContact

An email chief of staff across six inboxes

An always-on AI agent that reads his six inboxes across three businesses and tracks every open matter.

What it achieved

No client waits unnoticed: one agent tracks every open matter across his six inboxes and three businesses.

The short version

No client waits unnoticed: one agent reads every message in Maxwell's six inboxes, across three businesses, and always knows what is open and who owes the next move. It messages him on Telegram only when something needs him, and it runs with $0 in AI usage fees. His executive assistant triages one executive's Microsoft 365 email and books meetings over Telegram. This chief of staff instead follows each matter across all six inboxes, on both Google Workspace and Microsoft 365. A contract in one inbox, the invoice in another and a third person's reply become one matter, with its next action, deadline and owner. It never sends, deletes or moves a message, and no email can make it act.

The problem

Important threads cross between inboxes. A vendor's reply in one account answers a question asked from another. Inbox tools that sort single messages can't see that a client has waited four days. Reading everything by hand takes hours, and something always slips. An AI that reads email is also an attack surface, because any sender can put instructions in a message.

In use

  1. A client emails one of his business accounts. A small program with no AI in it notices the new mail, so a quiet hour costs nothing.
  2. The agent rebuilds that client's matter from every inbox it touches, instead of reacting to the one email.
  3. It marks the matter as waiting on Maxwell only after checking he has not already handled it. The next action and deadline go into a ledger only one program can write.
  4. His phone buzzes with one Telegram nudge, never repeated. He can ask the agent questions from his phone.

What it achieved

  • A client left waiting is caught: one agent follows every matter across six inboxes and three businesses, plus personal mail, around the clock, and messages his phone once when he is needed.
  • Hours of reading come off his day: he no longer reads every inbox by hand to find what is open and who owes the next move.
  • No added cost: it runs on his existing AI subscription with $0 in usage fees, the billing path removed by design and a monthly cost tripwire behind it.
  • No email can take control of it: two fresh adversarial reviewers attacked it with crafted emails instructing it to run commands, and the agent holds only read-only email tools.

The full record

On this page
In one sentence

Maxwell built an always-on email chief of staff, a 24-hour agent that runs a stateful headless Claude session across six inboxes and three businesses, rebuilds each matter from every inbox it touches instead of reacting to single emails, keeps a ledger that only one program may write, nudges him on Telegram when something needs him, and runs at $0 in API spend, in 2,934 lines of Python across ten modules with 88 tests, hardened by adversarial review against emails that try to make it run commands. He builds by directing AI agents, and he built this system that way.

inboxes
6
businesses
3
tests
88
API spend
$0

What it does

The chief of staff reads all of his email, all day, and keeps one answer current: what is open, who is waiting on whom, and what he has to do next. It never sends, deletes or moves a message.

Reading six inboxes

  • Six inboxes, three businesses and personal mail. Code Rescue and his other businesses, plus personal accounts, across both Google Workspace and Microsoft 365.
  • Read-only connectors. Mail is read through read-only MCP connectors. For Microsoft he registered his own single-tenant app with Mail.Read permission and nothing more.
  • A mail gate with no AI in it. mail_gate.py checks each inbox for new mail over the providers' REST interfaces using cursors and Microsoft Graph delta links. The AI only wakes when there is something new, so a quiet hour costs nothing.
  • Recovery folders. Spam, junk, trash and deleted folders are checked too, so a real message filed in the wrong place is still found.

Thinking in matters, not messages

  • Cross-inbox matters. A contract thread in one inbox, the invoice in another and the reply from a third person are one matter. The brain rebuilds each matter from everything it has seen.
  • Five states. Every matter is Resolved, Waiting on others, Waiting on you, Drifting or For your information.
  • A guard on "waiting on you". A matter can only be marked as waiting on him after the brain has checked whether he already resolved it, so he is not nudged about something he handled yesterday.
  • Each matter records its next action, deadline, owner, the evidence behind it and the inboxes it spans.
  • Learning his priorities. A discovery pass reads his sent and received mail to build a model of who and what matter to him.

The brain and the single writer

  • Stateful headless Claude. brain.py runs Claude Code in headless mode as a continuing session, so it remembers the matters it already knows. It does not write anything itself; it returns a patch.
  • One writer. A Python program is the only thing that changes the matter ledger. It validates the brain's patch and merges it, so a confused model cannot corrupt the record.
  • $0 API spend. The API key is stripped from the environment and overflow billing is disabled, so the brain runs on his existing Claude subscription and can never start a metered bill. A monthly cost tripwire watches for any spend.

Telling him what matters

  • Telegram nudges. One-way messages when a matter needs him, deduplicated with bucketed deadlines so the same reminder never arrives twice.
  • Chat from his phone. He can talk to the agent from his phone through Claude Code Remote Control.

Running every hour of every day

  • launchd service with KeepAlive tuning, a file-lock singleton so only one copy runs, log rotation and files locked to his user account.
  • Resilience. Cursor recovery, automatic resync when Microsoft returns an expired delta link, and backfill and replay to recover anything missed during an outage.
  • Housekeeping. Resolved matters older than 30 days are archived.

The modules

bot.py, brain.py, claude_dispatch.py, config.py, ledger.py, mail_gate.py, notifier.py, orchestrator_state.py, scheduler.py and telegram_client.py.

What it achieved

  • Six inboxes and three businesses watched around the clock by one agent.
  • $0 in API spend, with the billing path removed by design and a tripwire behind it.
  • Hardened against email attacks. Two fresh adversarial reviewers attacked it with crafted emails instructing it to run commands, and the agent is limited to an allowlist of read-only email tools, so no email can make it act.
  • 88 tests covering the gate, the ledger, the writer and the notifier.

The problem it solves

Running three businesses means six inboxes, and important threads cross between them. Inbox tools sort single messages; they do not know that a vendor's reply in one account answers a question asked from another, or that a client has been waiting four days. Reading everything by hand takes hours, and something always slips. An AI that reads email is also an attack surface: any sender can put instructions in a message. The chief of staff reads everything, tracks matters across inboxes, tells him only what needs him, and is built so that no email can make it act.

How he built it

Maxwell designed it around hard limits: read-only access everywhere, no AI on the hot path when nothing has changed, one program allowed to write state, and no path to a metered bill. He directed AI agents to build it in Python, with tests on every module, then sent it to two fresh adversarial reviewers who had not seen the build. Their review set the hardening it shipped with: the tool allowlist, the singleton lock, the cursor and delta-link recovery, the cost tripwire, file permissions, log rotation and archiving.