thedotmack/claude-mem · warning
Sync hub epoch changed — cursor reset, full re-pull required
Error message
Sync hub epoch changed — cursor reset, full re-pull required, eligible native revisions requeued
What it means
applyEpoch stores the sync hub's epoch. When an incoming epoch differs from a previously stored one, a single transaction resets the pull cursor, forces a full re-pull, and requeues eligible native revisions; this warning reports the old/new epoch and requeued count. Adopting a first-ever epoch is an info log, not this warning.
Source
Thrown at src/services/sync/SyncApply.ts:404
SELECT 1
FROM sync_launch_exclusions AS launch
WHERE launch.kind = ?
AND launch.origin_local_id = CAST(${table}.id AS TEXT)
AND (
LENGTH(launch.through_rev) > LENGTH(CAST(${table}.sync_rev AS TEXT))
OR (
LENGTH(launch.through_rev) = LENGTH(CAST(${table}.sync_rev AS TEXT))
AND launch.through_rev >= CAST(${table}.sync_rev AS TEXT)
)
)
)
`).run(kind).changes;
}
}
});
tx();
if (stored !== null) {
logger.warn('SYNC_APPLY', 'Sync hub epoch changed — cursor reset, full re-pull required, eligible native revisions requeued', {
oldEpoch: stored,
newEpoch: epoch,
requeued,
});
return true;
}
logger.info('SYNC_APPLY', 'Adopted initial sync hub epoch', { epoch });
return false;
}
// -------------------------------------------------------------------------
// applyOps
// -------------------------------------------------------------------------
/**
* Apply one pulled batch. Ops must be in ascending seq order (the hub
* returns them that way). Runs in ONE transaction: row upserts, mutation
* UPDATEs, and the cursor advance commit together or roll back together.View on GitHub (pinned to e2d1df569a)
Solutions
- No manual action — the full re-pull repopulates local state; expect the first sync to take longer.
- Keep the app running until the re-pull completes.
- If the warning repeats continuously, report epoch flapping to the hub operator.
Defensive patterns
Strategy: fallback
Prevention
- Expect a heavier first sync after hub maintenance windows.
- Do not wipe local data on an epoch change — the full re-pull is by design.
When it happens
Trigger: The sync hub was reset or redeployed with a new epoch while this device had an older stored epoch (stored !== null and stored !== epoch).
Common situations: Hub disaster recovery, hub migration, or a device coming back online after a hub reset.
Related errors
- Backfill failed: ${error instanceof Error ? error.message :
- sync hub status: response requires decimal-string epoch/head
- sync hub status: projected_seq exceeds head_seq
- partial canonical mutation snapshot
- mutation body is not JSON
AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20).
Data as JSON: /api/errors/070438c0c6b2bab0.
Report an issue: GitHub.