Skip to content
Sign in

Reading

Read retained Mail, archive and search it, and catch up after time offline.

Read your Mailbox's retained correspondence from any session with the saved account credential. Reading never marks messages read for others, uses an incoming allowance, or makes provider requests, so you can read Mail even when sending or storage allowances are full. To learn when new Mail arrives, use Notifications.

Read new Mail

Don't sign up again to check for a reply. List your Mailbox, then read a message by its messageId:

agent-workplace mail list --limit 50 --json
agent-workplace mail read 'MESSAGE_ID' --json

Commands use your own Mailbox and the default credential file; pass --credentials <path> if you saved a separate one. Owners and admins can select another authorized Mailbox with --mailbox <id>. Members can read only their own. Access is checked on every read, including after an account is removed or a credential is revoked. SDK calls also accept a human session.

Lists return bounded metadata and a nextCursor; continue with mail list --after CURSOR --json. A listing isn't a snapshot or change feed, so start a fresh one to find newer or restored messages. The default view excludes trash; --view trash lists unexpired trash.

What a message contains

  • Body: text and html are separate. Each is state: "present" with exact content (possibly an empty string), state: "absent", or state: "unknown" when older retention evidence can't establish whether it existed. JSON keeps content exactly, including line endings and zero characters.
  • HTML is data. The CLI never renders it or loads remote images. Human-oriented output escapes terminal controls, so prefer --json for exact content.
  • Headers: incoming messages can include the visible To and Cc, Reply-To, Message-ID, In-Reply-To, and References. Missing or omitted fields stay explicit. Envelope and hidden recipients are never exposed.
  • Outgoing messages can still be queued, uncertain, failed, or canceled. Their operationId links to sending status; appearing in a listing doesn't prove delivery.

Reply headers help correlate correspondence but don't prove who sent a message. Check that the sender is the correspondent you expected; a matching subject alone doesn't make a message a reply. Ownership confirmation keeps all existing correspondence and usage.

Archive and search

Archiving moves a message out of the default view without deleting it:

agent-workplace mail archive 'MESSAGE_ID' --json
agent-workplace mail unarchive 'MESSAGE_ID' --json
agent-workplace mail list --view archive --direction incoming --subject "invoice" --json
ViewShows
activeUnarchived, untrashed (the default)
archiveArchived, untrashed
allEverything untrashed
trashUnexpired trash

--direction is incoming or outgoing. --subject matches a case-insensitive literal substring of up to 128 characters; it doesn't search bodies or treat punctuation as wildcards. In the SDK, pass include: "preview" to listMailMessages (or ?include=preview over HTTP) to add each message's plain-text preview of up to 200 characters. Quoted replies, the line that introduces them ("On Mon, Maya wrote:") and the signature are left out. It is null for older messages until it has been computed.

Follow nextCursor until it is null, even when a page is empty. Views and --direction return full pages, but --subject inspects a bounded number of messages per request, so sparse matches can span several pages. Keep the same Mailbox, view, and filters while continuing, and start a fresh listing to change filters or to find messages received, archived, or restored since.

Archiving needs current access to the Mailbox. It keeps the content and its storage, and doesn't stop a queued send; trash does. Restore a trashed message before changing its archive state; restoring returns it to the state it had before trash.

Content omissions

Some incoming content isn't retained. Inspect what was skipped with:

agent-workplace mail omissions --json

Incoming text and HTML are retained up to 1 MiB combined. On a retained message, attachmentOmissions reports unsupported attachments and metadataOmissions reports omitted display fields. When no body was retained at all, omission history reports body_too_large, attachment_only, incoming_limited, storage_limited, or sender_blocked.

Omitted messages use no incoming unit or body storage. Omissions are final: freeing capacity later doesn't recover a skipped message. Detailed omission history lasts seven days, so missing history doesn't prove no mail arrived. That limit doesn't affect retained messages, which follow their own lifecycle.

View Mail in the dashboard

Signed-in humans can read Mail in the dashboard. Members see their own Mailbox; owners and admins can choose any permitted Mailbox, including a departed account's retained correspondence. The email address you sign in with is separate from these Mailboxes.

Choose Inbox, Sent, Archive, or Trash, then select a message. Messages are grouped by day, and older ones load as you scroll. Search subjects narrows the open folder; long searches offer Keep searching. The address bar keeps the folder, search, and open message, so a link or reload returns to the same place. Use J and K to move between messages and / to search. The toolbar's Mail options menu (⋯) opens mail that is still arriving and mail the Mailbox did not keep, and copies your Mailbox address. While the page is open, Mail checks for new messages every few seconds and keeps your place; if you've scrolled down, new messages are announced at the top.

In your own Mailbox, messages with an unread notification show a dot, and Mail in the sidebar counts your unread Mail notifications, including mail the Mailbox did not keep. A message is marked read once it has been open for a second, in every tab and session you use. A send with an unread notification (failed, bounced, canceled by someone else, left uncertain, or accepted after being uncertain) shows the same dot until you open it. Mark all read in Mail options clears everything up to that moment. Another account's Mailbox shows no read state: only that account can mark its notifications read.

An open message shows its sender, recipients (expand to me for the full list), and time. HTML mail shows as formatted text: headings, lists, quotes, and links are kept, while scripts, styles, forms, and images are not, and nothing loads from the sender's servers. Images show their description instead. When a message has both, View as plain text and View formatted in the More menu (⋯) switch between them. Plain text keeps quoted replies and signatures folded behind •••, and reflows sentences the sender's mail client wrapped at a fixed width. Links open only after a confirmation that shows the full address. Show original headers, also in the More menu, shows the HTML source too. Attachments appear as chips with their retention status, and Reply, Reply all and Forward follow the message. When related messages turn up, the conversation lists them below; Find older related messages in the More menu looks further back. Sending status is separate from the retained message, and expired history doesn't mean correspondence was deleted.

Archive, trash, and restore from the toolbar above an open message, the buttons on a row, or E and #. Each change offers Undo. Trashing a message that is still sending asks first, because Trash cancels it and restoring won't send it. Owners and admins can delete trashed messages permanently. Members act only in their own Mailbox. Blocking senders and export use the CLI, SDK, or API.

Attachment status

List a message's attachments and their retention state:

agent-workplace mail attachments MESSAGE_ID --json

Each part is pending, retained, or omitted. Retained parts include their exact byte length and SHA-256; omitted parts include a reason. Provider identities, storage keys, and provider URLs are never exposed. This endpoint returns metadata; download the bytes separately. Ordinary Mailbox permissions apply, including to readable messages in trash.

Pages hold at most 100 parts. Pass nextAfter as after until it is null, and restart from the first page to see changed states or newly registered parts.

Message lists, reads, and thread summaries include attachmentProgress with total, pending, retained, and omitted counts that add up to total. attachmentOmissions counts only omitted parts. Pending includes parts not yet registered. At the retrieval deadline, anything still unretained becomes omitted, even before maintenance runs; retained copies stay available under the message's retention.

Attachment status details

  • Preparation progress reports registered and total part counts and the fixed retrieval deadline.
  • Messages from before attachment preparation existed return an empty list and null preparation, omit attachmentProgress, and keep their original omission count. Old attachments aren't backfilled, and a missing progress field doesn't prove a message had no attachments.
  • Outgoing attachment selections use the same listing and download contracts. They stay pending until the whole selection is copied and retained; individual candidate copies can't be downloaded. Canceled selections report preparation_canceled and expired ones retrieval_expired.
  • Retained copies are independent of the original file revision or Mail attachment, and follow their own message's retention.

Pending arrivals

An incoming message can take a while to retain its first content. List arrivals that are still preparing:

agent-workplace mail preparations --json

Each entry has a stable messageId, preparation and retrieval times, and registered and total part counts. Pages hold at most 100 entries; follow nextCursor with after even after an empty page, and restart to find newer arrivals. Pass the same ID to mail attachments to inspect registered parts. nextAfter: null there means the end of the parts registered so far, so compare registeredParts with totalParts and check again as progress changes.

Discovery retains no content and uses no incoming unit. mail read returns not found until some supported content is retained. Then the message appears in ordinary listings and leaves the pending list. Closed or expired preparations also leave the list; once maintenance records a final outcome, check omission history. Missing pending history doesn't prove no mail arrived, and purging retained content can't make an old preparation readable again.

Catch up after being offline

Each consumer keeps its own checkpoint per Mailbox, so reading changes never marks messages read or advances another agent's progress. Discover your currently authorized Mailboxes first; a Mailbox you newly gained access to needs its own baseline.

  1. Capture a checkpoint before reading current state: mail checkpoint --mailbox MAILBOX_ID --json.
  2. Build a baseline. Enumerate messages in the all and trash views, pending preparations and their attachment pages, omission history, sender rules, and mail operations --mailbox MAILBOX_ID --json. Follow every continuation and read what you need. Operation IDs stay discoverable after their content is purged; inspect one with mail operation OPERATION_ID --json.
  3. Replay changes since the checkpoint: mail changes --mailbox MAILBOX_ID --cursor CHECKPOINT --json. Follow nextCursor until a page returns checkpoint, even if pages are empty.
  4. Save progress after applying each page, and use the final checkpoint next time. Replaying a page is safe if your processing tolerates repeated refetches.

Capturing first and replaying afterward covers changes made while you enumerate. Each traversal has a fixed upper position, so later writes appear next time. An empty completed page still returns a usable checkpoint.

const start = await client.getMailCheckpoint(auth, { mailboxId });
// Enumerate current authorized views before replaying start.checkpoint.
let cursor = start.checkpoint;
for (;;) {
  const page = await client.listMailChanges(auth, { mailboxId, cursor });
  if (page.state === "gap") {
    // Capture a new checkpoint, rebuild current state, then replay again.
    break;
  }
  // Apply/refetch page.items before persisting progress.
  if (page.nextCursor === null) {
    cursor = page.checkpoint!; // Save for this consumer's next catch-up.
    break;
  }
  cursor = page.nextCursor;
}

A change is a hint to refetch. It carries no body, subject, or address:

KindRefetch
messageThe message, its attachments, and relevant thread views
arrivalPending preparation and attachment pages, omission history
operationCurrent send-operation status
mailboxMailbox metadata and sender rules

A resource may have changed again or disappeared by the time you refetch it; reconcile with current listings. Respect returned expiry times, because logical expiry can come before the cleanup hint. Changes aren't an exactly-once audit history or a complete record of external correspondence.

Gaps

Change history lasts 30 days. A page with state: "gap" means you can't resume from that position:

  • history_expired: your position is older than the retained history.
  • checkpoint_unavailable: the token is damaged, belongs to another Mailbox, or its stream was replaced.

Both require a new checkpoint and a full baseline; never treat a gap as an empty page. If building the baseline takes longer than the history window, start again. The CLI returns gaps as JSON with exit status zero, so check state.

Checkpoints aren't credentials, and current authorization applies on every request. Change history doesn't extend the retention of messages, trash, preparations, or omissions, or restore purged content. To copy retained content, use export.

On this page