Skip to content

iMessage CloudKit per-thread sync stall: daemon restarts insufficient, Sync Now required #2

Description

@BaseInfinity

Cross-filed from BaseInfinity/claude-rdlc-wizard#3 — same fix applies to Codex-side RDLC projects.

Problem

Per-contact CloudKit sync stalls silently when ingesting iMessage from macOS chat.db. Some contacts current, others lag hours/days behind — no error signal.

What works

Messages > Settings > iMessage > Sync Now — Apple's official force-pull. Daemon restarts alone don't reset per-zone sync tokens.

4-step escalation ladder

  1. WAL checkpoint: `sqlite3 ~/Library/Messages/chat.db 'PRAGMA wal_checkpoint(PASSIVE);'`
  2. Kill imagent + identityservicesd
  3. Kill full cascade: `killall IMDPersistenceAgent soagent cloudd`
  4. AppleScript Sync Now button click (see claude-rdlc-wizard#3 for full script)

Smoke test fix

`imessage_account_sync_smoke.py` grouped by `h.account` — column removed in modern macOS. Fix: `GROUP BY h.id` (phone/email) for per-contact granularity.

Full script and details: BaseInfinity/claude-rdlc-wizard#3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions