- Move client.connect() inside try/catch in withClient - Add logImapError() writing full stack to /vaults/imap-errors.log for diagnosis - Extend patch-imapflow.cjs to guard this.remainder.trim() in parser-instance.js - Root cause of reported crash was undefined args.q (callers passing 'query' not 'q') Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>