Multi Mailbox Ops
Multi Mailbox Ops is a private, local-first control plane for safe multi-account Gmail work from Codex. It preserves source-mailbox identity, removes ordinary mail sending from the V1 tool surface, treats message content as untrusted data, and requires frozen exact-ID plans, identity re-attestation, verification, receipts, and rollback for live mutations. Its two most developed product loops are guarded named-mailbox operations and durable scheduled monitoring/reporting across independently checkpointed mailboxes.
Narrative
A mailbox control plane with a hard edge
Multi Mailbox Ops makes several Gmail identities operable from one Codex workflow without pretending they are one account. The gateway resolves a human alias to an immutable mailbox record, attests the live provider identity, and keeps ordinary mail sending absent from the V1 capability surface. Mail content is untrusted data; it cannot select tools, expand scope, or grant authority.
Exact plans, recoverable changes
Live organization and cleanup work follows a frozen-plan protocol: discover, classify, freeze exact provider IDs and preconditions, review bounded authority, re-attest, execute, verify, and retain a redacted receipt with rollback state. Labels and archive are preferred, Trash is separately bounded and recoverable, and permanent deletion remains unavailable.
Monitoring that cannot silently consume its report
Hourly mailbox coverage and scheduled reporting use independent durable cursors. Sanitized outcomes enter a private ledger, exact 9:00 AM and 5:00 PM Eastern reports freeze into reconciled pages, and committed delivery remains in a replayable outbox until a later user-visible acknowledgment proves it was surfaced. Failures and partial coverage remain visible instead of being summarized away.
Privacy is part of the architecture
OAuth client material and refresh tokens live in macOS Keychain. The repository and machine-local operation store retain only the minimum non-secret registry, opaque identifiers, synthetic fixtures, policy versions, redacted outcomes, and recovery evidence needed for auditability. Public proof uses fictional report data rather than mailbox screenshots.
System surfaces
Codex MCP gateway
Constrained project-specific search, read, preview, organization-policy, and monitoring tools with no ordinary send tool or generic Gmail fallback.
Focused CLI
Mailbox onboarding, health checks, authority review, exact-plan execution, rollback, and monitor recovery commands for the root operator.
Identity and operation store
Machine-local registry, Keychain references, frozen plans, intents, redacted receipts, rollbacks, checkpoints, and delivery outbox.
Scheduled monitor report
Synthetic-proven responsive report surface with per-mailbox totals, exact message ledger, applied/skipped/failed outcomes, coverage windows, and checkpoint state.
Repository Context Layer
Product contracts, safety decisions, project checkpoints, synthetic evidence, and deterministic documentation dashboard used as the operational source of truth.
Implementation stack
Runtime
- • Node.js
- • TypeScript
- • ES modules
- • Zod
- • Google APIs
- • Model Context Protocol SDK
Local security boundary
- • macOS Keychain
- • Desktop OAuth loopback
- • immutable mailbox registry
- • positive endpoint allowlist
- • root-owned live mutation
Durable operations
- • frozen exact-ID plans
- • policy digests
- • redacted receipts
- • rollback manifests
- • coverage/report cursors
- • replayable delivery outbox
Verification
- • Vitest
- • TypeScript
- • synthetic Gmail adapter
- • forbidden-capability scan
- • release-package gate
- • docs determinism
- • responsive report proof
Evidence
18 artifacts grouped by type so each kind of proof can be scanned on its own.
Data models
2 artifactsWorkflows
2 artifactsImages
4 artifacts
imagePublic-safe fictional report showing mailbox totals, exact ledger outcomes, controlled labels, coverage windows, checkpoint state, and pending delivery acknowledgment.
imageRepository-owned portfolio view showing the active program, bounded project streams, attention queue, and explicit operator-owned decisions.
imageResponsive proof that the same synthetic evidence remains legible in a narrow report surface.
imageThe same operational source of truth at a narrow viewport, preserving lifecycle counts and active/blocked/in-review separation.
Chats
4 artifactsBuilding the Gateway and Stopping at the OAuth Security Gate
Designing Multi Mailbox Ops as a Source-Mailbox Gateway
Hardening Multi Mailbox Ops into a Four-Mailbox Monitor
Turning Operator Feedback into Mailbox Reporting and Routing Contracts
Notes
6 artifactsConnected references
Key dates
The repository scaffold defined explicit mailbox routing, structural no-send, reversible cleanup, separate unsubscribe authority, and privacy-safe evidence.
The TypeScript gateway, local Gmail runtime, Keychain boundary, Codex plugin, frozen workflows, and synthetic safety harness reached a reproducible release gate.
Source checkpoints record exact-plan organization and a separately approved limited cleanup/unsubscribe pilot while retaining no-send and no-permanent-delete boundaries.
Independent coverage/report cursors, exact scheduled boundaries, paginated reconciliation, replayable delivery, multi-mailbox bundle proof, and label-drift handling landed on main.
The project was reviewed from clean source main and prepared as one active project with public-safe workflow, data-model, document, and synthetic image evidence.