See Continuation Emails for full details.
• When per-run iteration limit is hit, orchestrator sends a MIME email to itself with a JSON attachment containing full processing state• On next run, continuation email is detected, state is restored, and processing resumes• Per-run limit: configurable via --max-iterations (default 8)• Total limit across all continuations: 24 iterations• Continuation emails automatically cleaned up (moved to Done) after processing• Sent via smtplib (not mail command) for proper MIME multipart construction
• Folder list fetched on startup and included in LLM context (iteration 1)• New list_folders boolean field on EnvoyResponse to refresh folder list on demand• New EmailFetch model replacing plain Message-ID strings — includes folder hint for faster cross-folder lookup• Fallback search order when fetching by ID: hinted folder → INBOX → Done → other folders
• Refactored from 6 separate IMAP connections to ONE connection opened in main()• Client passed as first parameter to all IMAP-using functions• Fixes stale sequence number bugs — IMAP sequence numbers are session-specific• Move and delete operations now re-lookup emails by Message-ID header in current session
• Orchestrator now expunges \Deleted messages from the target folder before processing• Allows manual cleanup via IMAP flags — mark messages \Deleted and they're purged on next run
See Email Delivery & Address Routing.• map_email_address() using email.utils.parseaddr from stdlib• EMAIL_MAP dict maps cleaned addresses to replacements (e.g. john.critchley@bluewin.ch → john@critchley.biz)
• Fixed IMAP list_folders parser — was returning delimiter '/' instead of folder names• Fixed stale IMAP sequence numbers in execute_actions — move/delete now re-lookup by Message-ID• Fixed duplicate reply detection to use map_email_address instead of inline regex
• orchestrator.py — Major changes throughout (single connection, continuation, multi-mailbox, email rewriting, expunge)• envoy_schema.py — Added EmailFetch, list_folders field• new_envoy_response_schema.json — Matching schema updates• imap_client.py — Fixed list_folders parser