-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
iMessage channel replays old messages after update restart — no cursor persistence #62761
Copy link
Copy link
Closed
Closed
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
After running
openclaw update(updated to 2026.4.5), the iMessage channel replayed a large batch of already-processed messages, causing an outgoing message loop.Version
Steps to Reproduce
openclaw update(or any restart that causes the plugin to briefly fail to load)What Happened
During the update, the iMessage plugin failed to load mid-restart due to a missing dependency (
Cannot find module), causing two forced restarts. When the channel finally came back up, it had lost its in-memoryrowidcursor.imsg watchthen replayed ~30 minutes of previously-processed messages — each one triggered an agent run and sent a reply, creating a loop.From the logs:
Root Cause
The iMessage channel does not persist its
--since-rowidcursor to disk. Theimsg watchcommand supports--since-rowidand--startparameters, but on any restart the cursor resets and old messages are replayed.Expected Behavior
The last processed
rowidshould be persisted to disk (e.g. in~/.openclaw/) so that after any restart (update, crash, config reload),imsg watchis called with--since-rowidinstead of replaying the full backlog.Workaround
Setting
channels.imessage.historyLimit: 0reduces but does not eliminate the replay window. The only real fix is cursor persistence.Additional Context
imsg watch --helpconfirms both--since-rowidand--startare supported