Skip to content

Remove client-side iMessage split-send coalescing once imsg coalesces upstream #91243

@omarshahine

Description

@omarshahine

Summary

Once imsg coalesces Apple URL-preview split-sends upstream (openclaw/imsg#141), OpenClaw no longer needs to debounce + merge them client-side. At that point the entire client-side coalescing path — including the channels.imessage.coalesceSameSenderDms config — becomes dead weight and should be removed.

Background

Apple splits Dump https://example.com into a text row + a separate URL-preview row ~0.8–2s apart. Today OpenClaw handles this in the iMessage monitor:

  • channels.imessage.coalesceSameSenderDms opts a DM into a 2.5s debounce window.
  • Same-sender DMs bucket on chat:sender; on flush, the bucket merges if it carries imsg's balloon_bundle_id URL marker (fix(imessage): gate split-send coalescing on imsg metadata #90858), else falls back to a legacy merge (interim back-compat for older imsg builds).

This imposes up to 2.5s latency on every DM (you must hold the first row before the preview row can arrive) and duplicates logic that belongs in imsg.

What to remove (once imsg#141 ships and is the minimum supported build)

  • channels.imessage.coalesceSameSenderDms config key (+ schema, help, defaults, docs).
  • DM chat:sender bucketing, the 2.5s debounceMsOverride, and the shouldDebounce opt-in branch in extensions/imessage/src/monitor/monitor-provider.ts.
  • combineIMessagePayloads / shouldCombineIMessagePayloadBucket + balloon helpers in extensions/imessage/src/monitor/coalesce.ts, including the interim back-compat branch added in fix(imessage): gate split-send coalescing on imsg metadata #90858.
  • The balloon_bundle_id field plumbing in parse-notification.ts / types.ts if no longer consumed.
  • Associated tests and docs.

Config-removal discipline (AGENTS.md)

coalesceSameSenderDms is persisted config. Per the runtime-reads-canonical-config rule, removing it requires an openclaw doctor --fix migration that drops the stale key from existing openclaw.json files — no runtime compat shim. This issue owns that migration.

Dependencies / sequencing

Acceptance criteria

  • coalesceSameSenderDms removed from the config surface; doctor --fix migrates existing configs.
  • iMessage monitor no longer debounces DMs for split-send merging (no per-DM latency).
  • URL split-sends still arrive as a single agent turn (now via imsg).
  • Net non-test LOC decreases.

Metadata

Metadata

Assignees

Labels

P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper 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.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.maintainerMaintainer-authored PR

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions