fix(imessage): stop reasoning echo feedback loops and harden reply suppression#25923
fix(imessage): stop reasoning echo feedback loops and harden reply suppression#25923
Conversation
PR SummaryMedium Risk Overview Hardens iMessage echo suppression by expanding the sent-message cache from text-only to text + outbound Improves messaging tool-send extraction by accepting Written by Cursor Bugbot for commit 90256e9. This will update automatically on new commits. Configure here. |
a071207 to
90256e9
Compare
|
Landed via temp rebase onto
Thanks @steipete! |
Summary
messageIdmatching with longer TTL and normalized text fallbackmessage.targetfallback in message-send suppression extraction (same core fix as fix(agents): support message.target in send extraction #25623/fix(message): include target in reply suppression tracking #25757)Why this is the right fix
Tests
message.targetextraction regression testValidation
pnpm check❌ (fails on pre-existing unrelatedtsgoerrors inextensions/matrix/src/matrix/send-queue.test.tsandsrc/auto-reply/reply/followup-runner.test.ts)pnpm build✅pnpm test❌ (single unrelated failure insrc/process/exec.test.ts: no-output timer SIGKILL assertion)Closes #25897
Closes #25383
Supersedes #25623
Supersedes #25757
Greptile Summary
This PR fixes iMessage reasoning echo feedback loops through a defense-in-depth approach that addresses both sides of the runaway loop: outbound reasoning leakage and inbound echo re-ingestion.
SentMessageCachesplit into dual maps with separate TTLs —messageIdlookups use a 60s TTL (vs 5s for text) to handle delayed polling. Text normalization (CRLF, whitespace) and placeholder ID filtering ("ok"/"unknown") improve matching accuracy.normalizeReplyPayloadsForDeliveryandrouteReplyboth filterisReasoningpayloads early, preventing hidden thinking text from reaching any channel.message.targetfallback for send suppression:extractMessagingToolSendnow acceptsargs.targetas an alias forargs.to, fixing message-send suppression extraction (same core fix as fix(agents): support message.target in send extraction #25623/fix(message): include target in reply suppression tracking #25757).message.targetextraction test.Confidence Score: 5/5
Last reviewed commit: 90256e9