#4191·claude-mem

Cloud sync permanently stuck: SyncHub push response violates head_seq <= projected_seq invariant

Author: ayushereCreated Sep 22, 2026Updated Sep 27, 2026

Summary

Cloud sync (cmem.ai Pro / SyncHub) is permanently stuck for my account. Every push attempt is rejected by the client's own consistency check because SyncHub's push response is self-inconsistent (head_seq and projected_seq violate the invariant the client enforces). This looks like server-side checkpoint corruption, not a client misconfiguration.

Environment

  • claude-mem version: 13.24.5
  • Hub URL: sync-hub.black-pond-afbb.workers.dev
  • Epoch: 7392216847640555134
  • Device id (before reset attempt): f2031454-4f22-4af4-8d28-7374d2a55e35

What's happening

GET /api/sync/status on the local worker consistently reports:

json
{
  "configured": true,
  "lastFlushAt": null,
  "lastError": "sync hub push: checkpoint order requires head_seq <= projected_seq",
  "hub": {
    "reachable": true,
    "epoch": "7392216847640555134",
    "headSeq": "200",
    "projectedSeq": "0",
    "error": null
  }
}
  • configured: true, hub.reachable: true — the token/userId/hubUrl are correct and the status probe (GET /v1/sync/status) succeeds fine, since that endpoint's invariant is projected_seq <= head_seq (satisfied by 0 <= 200).
  • But every actual push (POST /v1/sync/ops) gets a response where validatePushResponse in worker-service.cjs throws checkpoint order requires head_seq <= projected_seq, because the push response itself reports head_seq: 200 > projected_seq: 0. That's an inverted invariant from the status endpoint, and the client is correctly refusing to trust it — I don't think patching the client to skip this check is the right fix, since it exists to protect against exactly this kind of malformed/corrupted server state.
  • Result: 253 pending observations, 81 summaries, 227 prompts, and 66k+ mutations have been queued locally for hours with lastFlushAt: null and no way to flush.

What I tried

Per the cloud-sync skill, I re-verified and rewrote the three connection values (token/userId/hubUrl) from cmem.ai → Connect — no change, same error.

I then tried forcing the worker to mint a fresh device id (clearing CLAUDE_MEM_CLOUD_SYNC_DEVICE_ID and restarting), in case the checkpoint was corrupted per-device rather than per-account. That produced a different rejection instead:

sync hub push 400: {"error":"invalid_ops: ops[0] origin_device_id does not match authenticated X-Device-Id"}

— because the already-queued local ops were stamped with the old device id. This suggests the checkpoint corruption is account-scoped (tied to the userId/token), not device-scoped, so a device reset alone can't route around it. I reverted the device id change back to the original; nothing was lost (all push attempts failed cleanly, so no ops were sent under the mismatched device id).

Request

  1. Is there a supported way for a user to trigger a server-side checkpoint/epoch reset for their account from the client side (e.g. an admin endpoint or a "resync" action in the cmem.ai dashboard)? I couldn't find one in worker-service.cjs's route table.
  2. If this needs a manual fix on SyncHub's backend, could someone take a look at the account tied to the epoch above? Happy to provide the account/user id privately if needed (not posting it here).

Thanks for the great tool — just stuck on this one account-level state issue.