Bug
createReplyDraftDirect() in src/token-api.ts uses $filter=conversationId eq '...' at /me/messages, which returns InefficientFilter / 400 errors on MS Graph. This breaks:
superhuman reply --attach <file> for Outlook accounts
superhuman reply-all --attach <file> for Outlook accounts
- Any code path that calls
createReplyDraftDirect() or sendReplyDirect() with an MS Graph token
Root Cause
The broken pattern at line 2785:
/me/messages?$filter=conversationId eq '${threadId}'&$select=id&$orderby=receivedDateTime desc&$top=1
This is a known MS Graph limitation (documented in memory). The same bug was previously fixed in getThreadInfoDirect() by switching to client-side filtering.
Fix
Replace server-side $filter with the client-side filtering pattern already used by getThreadInfoDirect():
- Fetch recent 50 messages
- Filter by
conversationId client-side
- Fallback: try treating
threadId as a direct message ID
Impact
- Outlook/MS Graph accounts cannot reply with attachments
- Gmail accounts are unaffected (different code path)
Bug
createReplyDraftDirect()insrc/token-api.tsuses$filter=conversationId eq '...'at/me/messages, which returnsInefficientFilter/ 400 errors on MS Graph. This breaks:superhuman reply --attach <file>for Outlook accountssuperhuman reply-all --attach <file>for Outlook accountscreateReplyDraftDirect()orsendReplyDirect()with an MS Graph tokenRoot Cause
The broken pattern at line 2785:
This is a known MS Graph limitation (documented in memory). The same bug was previously fixed in
getThreadInfoDirect()by switching to client-side filtering.Fix
Replace server-side
$filterwith the client-side filtering pattern already used bygetThreadInfoDirect():conversationIdclient-sidethreadIdas a direct message IDImpact