Skip to content

[Bug]: iMessage self-chat causes bot to re-ingest its own messages, leading to session loops #2585

Description

@cohenyehonatan

Summary

When using iMessage, Clawdbot can ingest its own outbound messages as inbound user messages, particularly in self-chat threads (sender == recipient). This causes session loops, repeated responses, token overuse, and in some cases leakage of internal/system messages back into the chat.

Other channels (WhatsApp, Telegram, Slack, etc.) do not exhibit this behavior.

Steps to reproduce

  1. Enable the iMessage channel on macOS.
  2. Start a direct iMessage conversation where the sender and recipient are the same identity (e.g. texting your own number / Apple ID).
  3. Send a message that causes Clawdbot to reply.
  4. Observe that Clawdbot’s outbound message is treated as a new inbound message.
  5. The agent continues responding to itself, sometimes repeatedly.

Expected behavior

Outbound messages sent by Clawdbot should never be re-ingested as inbound user messages.

Self-originated iMessage events (sender == recipient) should be dropped, matching the behavior of other channel adapters.

Actual behavior

Outbound iMessage messages are sometimes received back as inbound events and passed to the agent as if they came from a human, causing:

  • session loops
  • repeated responses
  • token burn
  • occasional leakage of internal/system text into the chat

Environment

  • Clawdbot version: 2026.1.24-3
  • OS: macOS Sequoia 15.2
  • Install method: npm via curl

Logs or screenshots

Attached screenshots show Clawdbot’s outbound iMessage replies being re-ingested as inbound messages, including rate-limit errors being echoed back and triggering further replies.
Image
Image
Image

I can provide logs if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions