Skip to content

watch: outbound messages echoed as is_from_me=false duplicates #72

@egantz

Description

@egantz

Summary

When sending a message via imsg send, the watch stream emits two records for the same message:

  1. is_from_me: true (correct outbound)
  2. is_from_me: false with identical text (spurious duplicate)

Evidence

{"id":753031,"is_from_me":true,"text":"Test message...","guid":"896ECCAD-..."}
{"id":753032,"is_from_me":false,"text":"Test message...","guid":"75BDDF1E-..."}

Same text, different GUIDs, different ids, opposite is_from_me values.

Impact

Clients using watch to build chat bots filter is_from_me: true to avoid echo loops, but the is_from_me: false duplicate still triggers inbound handling.

Suggested fix

Deduplicate by content hash + timestamp within a short window (e.g., 2s), or investigate why macOS Messages stores these delivery-confirmation records.

Environment

  • imsg 0.5.0
  • macOS 25.4 (arm64)
  • Clawdbot gateway consuming watch stream

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions