Skip to content

fix(imessage): drop all is_from_me messages unconditionally#1

Merged
noahyoungs merged 10000 commits into
mainfrom
alder/fix-imessage-echo-filter
Apr 7, 2026
Merged

fix(imessage): drop all is_from_me messages unconditionally#1
noahyoungs merged 10000 commits into
mainfrom
alder/fix-imessage-echo-filter

Conversation

@noahyoungs

Copy link
Copy Markdown
Owner

Problem

iMessage reflects outbound agent messages back as inbound user messages (with control-char prefixes in some cases), causing echo reply loops. Closes openclaw#59363 upstream.

Root cause

resolveIMessageInboundDecision had a special path for self-chat where is_from_me=true messages would only be dropped if the echo-cache matched. When the cache missed (e.g. empty sentText on media-only sends, or control-char prefixed reflections), the message passed through as a user message and triggered another agent reply.

Fix

Drop all is_from_me messages unconditionally — matching the behaviour that already existed for non-self-chat DMs and groups. The selfChatCache.remember() call is preserved so the subsequent is_from_me=false SQLite reflection is still caught by the selfChatCache.has() check.

Files changed

  • extensions/imessage/src/monitor/inbound-processing.ts: collapse self-chat branch into unconditional drop

Fixes: openclaw#59363

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: imessage echo loop