openclaw - 💡(How to fix) Fix iMessage duplicate delivery: gateway retries send every ~17s when imsg CLI slow to ack on long turns [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63293Fetched 2026-04-09 07:55:41
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

iMessage replies are being delivered multiple times (doubles, triples) at regular ~17-second intervals when the turn involves multiple tool calls or takes longer than ~15 seconds to complete.

Root Cause

iMessage replies are being delivered multiple times (doubles, triples) at regular ~17-second intervals when the turn involves multiple tool calls or takes longer than ~15 seconds to complete.

Fix Action

Fix / Workaround

  • Duplicates occur: on turns with multiple tool calls (exec, config.patch, schema.lookup, etc.) that take >15s to complete
  • No duplicates: on short single-reply turns that complete in <5s
  • Interval: consistently ~17 seconds between duplicate deliveries
  • Stops: after some number of retries (message is eventually acked)

Code Example

11:16:55.875 [imessage] delivered reply to imessage:+16023000493
11:17:12.261 [imessage] delivered reply to imessage:+16023000493  (17s later)
11:17:33.294 [imessage] delivered reply to imessage:+16023000493  (21s later)
RAW_BUFFERClick to expand / collapse

Summary

iMessage replies are being delivered multiple times (doubles, triples) at regular ~17-second intervals when the turn involves multiple tool calls or takes longer than ~15 seconds to complete.

Environment

  • OpenClaw: 2026.4.7 (5050017)
  • imsg CLI: 0.5.0
  • macOS: Darwin 25.3.0 (arm64)
  • Channel: iMessage (direct DM)
  • Config: dmHistoryLimit: 0, maxConcurrent: 1, blockStreaming: false

Observed Behavior

Gateway log shows multiple delivered reply events for the same turn at ~17-second intervals:

11:16:55.875 [imessage] delivered reply to imessage:+16023000493
11:17:12.261 [imessage] delivered reply to imessage:+16023000493  (17s later)
11:17:33.294 [imessage] delivered reply to imessage:+16023000493  (21s later)

The user receives 2-3 identical messages per turn.

Pattern

  • Duplicates occur: on turns with multiple tool calls (exec, config.patch, schema.lookup, etc.) that take >15s to complete
  • No duplicates: on short single-reply turns that complete in <5s
  • Interval: consistently ~17 seconds between duplicate deliveries
  • Stops: after some number of retries (message is eventually acked)

Hypothesis

The gateway appears to retry imsg send on a ~17s timer when it doesn't receive a prompt acknowledgment from the CLI. On short turns, the CLI acks before the timer fires. On long turns (multi-tool), the CLI takes longer and the retry fires 1-3 times before ack arrives.

Attempted Config Changes (none resolved the issue)

  • Set dmHistoryLimit: 0 — no change
  • Set blockStreaming: true with coalesce — made worse (stacked queued messages)
  • Set maxConcurrent: 1 — no change
  • Disabled/removed fabric-sync hook — no change
  • Reverted blockStreaming: false — no change

Expected Behavior

Each turn should deliver exactly one reply to the user, regardless of turn duration.

Possible Fix

Consider adding send deduplication with a message ID / content hash check before retrying, or increasing the ack timeout on the imsg delivery path so short-lived retry storms don't fire on normal multi-tool turns.

extent analysis

TL;DR

Implementing send deduplication with a message ID or content hash check may prevent duplicate iMessage deliveries.

Guidance

  • Investigate the feasibility of adding a message ID or content hash check before retrying imsg send to prevent duplicate deliveries.
  • Consider increasing the ack timeout on the imsg delivery path to prevent short-lived retry storms on normal multi-tool turns.
  • Review the gateway log to understand the retry mechanism and its timer configuration.
  • Analyze the CLI acknowledgment process to determine why it takes longer to acknowledge on turns with multiple tool calls.

Example

No code snippet is provided as the issue does not contain explicit code references.

Notes

The provided hypothesis suggests that the gateway retries imsg send on a ~17s timer when it doesn't receive a prompt acknowledgment from the CLI. However, the exact implementation details of the retry mechanism and the acknowledgment process are unclear.

Recommendation

Apply a workaround by implementing send deduplication, as it directly addresses the identified issue of duplicate deliveries. Increasing the ack timeout may also be beneficial, but its effectiveness depends on the specific requirements of the application.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING