{"record":{"id":"b04227a30fd2e278","repo":"thedotmack/claude-mem","slug":"pull-wedged-the-same-page-keeps-failing-backing","errorCode":null,"errorMessage":"Pull wedged: the same page keeps failing; backing off and retrying","messagePattern":"Pull wedged: the same page keeps failing; backing off and retrying","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/services/sync/SyncClient.ts","lineNumber":888,"sourceCode":"   * unmoved — log distinctly so the wedge is visible in the logs.\n   */\n  private recordFailure(error: unknown): void {\n    const err = error instanceof Error ? error : new Error(String(error));\n    let cursor: string | null = null;\n    try {\n      cursor = this.apply.getCursor();\n    } catch { /* DB may be closing — cursor stays null */ }\n    if (cursor === this.failCursor) {\n      this.failStreak++;\n    } else {\n      this.failCursor = cursor;\n      this.failStreak = 1;\n    }\n    this.backoffMs = this.backoffMs === 0\n      ? this.backoffInitialMs\n      : Math.min(this.backoffMs * 2, this.backoffMaxMs);\n    if (this.failStreak >= 3) {\n      logger.warn('SYNC_CLIENT', 'Pull wedged: the same page keeps failing; backing off and retrying', {\n        cursor,\n        failStreak: this.failStreak,\n        backoffMs: this.backoffMs,\n      }, err);\n    } else {\n      logger.debug('SYNC_CLIENT', 'Pull failed (non-blocking; will retry)', {\n        cursor,\n        backoffMs: this.backoffMs,\n      }, err);\n    }\n  }\n}\n","sourceCodeStart":870,"sourceCodeEnd":901,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/e2d1df569a8f04075d40e92461128ece7cf04c82/src/services/sync/SyncClient.ts#L870-L901","documentation":"On every pull failure the client doubles its backoff (up to the max) and records which cursor failed. When the same cursor fails 3+ times in a row (`failStreak >= 3`) this warning fires: one page of the pull stream is persistently failing and is retried with backoff instead of blocking progress. Failures on a moving cursor stay at debug level.","triggerScenarios":"The same cursor/page fails on every attempt — an op row the client cannot apply (schema mismatch, malformed op) or a durable server error for that revision range.","commonSituations":"Client/server version skew after a hub upgrade, or a poison revision that every apply attempt rejects.","solutions":["Update claude-mem so client and hub schema versions match, then restart.","Read the attached error for the failing op; if it is a poison revision, ask the hub admin to skip or repair that range.","If it self-clears, no action — the backoff retries until the page applies."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Upgrade clients promptly after hub upgrades to avoid schema skew.","Watch failStreak warnings during rollout windows; three failures on one cursor means a poison page, not flakiness."],"tags":["sync","pull","backoff","poison-message","cursor"],"backgroundTag":"poison-message-retry","analyzedSha":"e2d1df569a8f04075d40e92461128ece7cf04c82","analyzedAt":"2026-08-20T23:58:13.836Z","contentChangedAt":"2026-08-20T23:58:13.836Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}