Repository navigation
fix(imessage): stop dropping user text that collides with recent outbound sends - #120260
Conversation
…nds stop feeding the loop limiter Two silent-drop paths in the iMessage monitor: 1. The persisted 12h echo cache matched inbound user text against old outbound text even when the GUIDs conflicted — a user sending 'ok' within 12h of the agent sending 'ok' was dropped as an echo. The text branch now applies the same hasConflictingMessageIds guard the media branch has; genuine reconnect echoes still match by id or id-less entries. 2. Every from-me row fed the echo loop rate limiter, so a normal outbound burst (agent replies, multi-chunk sends, operator phone traffic) could trip the limiter and silently suppress the next legitimate inbound message. 'from me' is no longer counted as a loop signal, and a tripped limiter now logs a default-level warning once per conversation instead of verbose-only.
|
Codex review: found issues before merge. Reviewed August 7, 2026, 12:39 PM ET / 16:39 UTC. ClawSweeper reviewWhat this changesThe PR changes iMessage echo matching and loop-limit accounting so same-text inbound messages and ordinary outbound bursts are not silently discarded. Merge readiness⛔ Blocked by patch quality or review findings - 9 items remain Keep this maintainer PR open: its no-GUID self-chat path still dispatches delayed agent echoes after the in-memory cache expires, and its new default warning logs raw DM sender identifiers. Priority: P1 Review scores
Verification
How this fits togetherThe iMessage monitor converts bridge database rows into inbound agent events. Echo caches and the loop limiter suppress reflected messages before the monitor either dispatches an event or records an intentional drop. flowchart LR
A[iMessage bridge rows] --> B[Inbound decision]
B --> C[In-memory and persisted echo caches]
B --> D[Loop limiter]
C --> E[Dispatch or echo drop]
D --> E
E --> F[Agent conversation]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The new default-level limiter warning records a raw DM sender identifier. PR surfaceSource +34. Total +34 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Propagate the existing no-GUID self-chat exception through persisted echo matching, add the expiry-boundary regression, and redact the limiter-warning conversation identifier. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: persist a GUID-backed self-chat echo, advance beyond the four-second memory TTL, then process its no-GUID numeric-row reflection; current code dispatches it. Is this the best way to solve the issue? No. The conflicting-ID guard is the right owner boundary for normal inbound text, but it must retain the existing no-GUID self-chat exception and avoid adding unredacted default logs. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b738e2578087. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Merged via squash.
|
…ound sends (openclaw#120260) * fix(imessage): text echo matching honors message-id conflicts; own sends stop feeding the loop limiter Two silent-drop paths in the iMessage monitor: 1. The persisted 12h echo cache matched inbound user text against old outbound text even when the GUIDs conflicted — a user sending 'ok' within 12h of the agent sending 'ok' was dropped as an echo. The text branch now applies the same hasConflictingMessageIds guard the media branch has; genuine reconnect echoes still match by id or id-less entries. 2. Every from-me row fed the echo loop rate limiter, so a normal outbound burst (agent replies, multi-chunk sends, operator phone traffic) could trip the limiter and silently suppress the next legitimate inbound message. 'from me' is no longer counted as a loop signal, and a tripped limiter now logs a default-level warning once per conversation instead of verbose-only. * fix(imessage): preserve delayed echo guards
What Problem This Solves
Fixes two message-loss paths in the iMessage monitor:
hasConflictingMessageIdsguard (added in 0ac7b24); the text branch was missing it.is_from_merow fed the echo-loop rate limiter, so an ordinary outbound burst — agent replies, multi-chunk sends, the operator texting from their own phone — could trip the limiter, which then silently suppressed the next legitimate inbound messages (verbose-only log).Why This Change Was Made
Genuine reconnect echoes match via the messageId branch (same GUID) or via id-less pending entries, so the id-conflict guard is a no-op for every legitimate echo — its absence protected nothing and violated the in-memory cache's documented "never message loss" contract. For the limiter, own-send rows are expected transport traffic, not amplification signal; only
echo/self-chat echo/reflected assistant contentremain loop signals. A tripped limiter now also logs a default-level warning once per conversation, so suppression is never invisible.User Impact
iMessage users can send short replies that collide with recent agent output without losing them, and busy conversations no longer silently mute after outbound bursts.
Evidence
node scripts/run-vitest.mjs extensions/imessage/src/monitor/cache-lifecycle.test.ts extensions/imessage/src/monitor/inbound-processing.test.ts extensions/imessage/src/send.test.ts— pass, with a new regression proving text+conflicting-id is not an echo while same-id and id-less matches still work.