Summary
When sending a message via imsg send, the watch stream emits two records for the same message:
is_from_me: true (correct outbound)
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
Summary
When sending a message via
imsg send, thewatchstream emits two records for the same message:is_from_me: true(correct outbound)is_from_me: falsewith 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, oppositeis_from_mevalues.Impact
Clients using
watchto build chat bots filteris_from_me: trueto avoid echo loops, but theis_from_me: falseduplicate 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