thedotmack/claude-mem · warning

Prompt watermark bump skipped — write failed

Error message

Prompt watermark bump skipped — write failed

What it means

syncUserPrompt writes a single formatted prompt document and bumps the prompts watermark only when addDocuments returns 1. A failed write (written !== 1) skips the bump and logs this warning; the prompt stays unmarked and is retried by backfill.

Source

Thrown at src/services/sync/ChromaSync.ts:580

      created_at_epoch: createdAtEpoch,
      memory_session_id: memorySessionId,
      project: project,
      platform_source: normalizePlatformSource(platformSource)
    };

    const document = this.formatUserPromptDoc(stored);

    logger.info('CHROMA_SYNC', 'Syncing user prompt', {
      promptId,
      project
    });

    // Only bump on a confirmed full write — see syncObservation() for rationale.
    const written = await this.addDocuments([document]);
    if (written === 1) {
      ChromaSyncState.bump(project, 'prompts', promptId);
    } else {
      logger.warn('CHROMA_SYNC', 'Prompt watermark bump skipped — write failed', {
        promptId,
        project,
        written
      });
    }
  }

  private mergeRowsById<T extends { id: number }>(rows: T[], pendingRows: T[]): T[] {
    const merged = new Map<number, T>();
    for (const row of rows) {
      merged.set(row.id, row);
    }
    for (const row of pendingRows) {
      merged.set(row.id, row);
    }
    return [...merged.values()].sort((a, b) => a.id - b.id);
  }

View on GitHub (pinned to e2d1df569a)

Solutions

  1. Rely on the automatic retry/backfill for prompts.
  2. Check Chroma availability and the underlying error in logs.
  3. Confirm the prompt count catches up after Chroma recovers.
Defensive patterns

Strategy: retry

Validate before calling

async function chromaHealthy(baseUrl: string): Promise<boolean> {
  try {
    const res = await fetch(`${baseUrl}/api/v2/heartbeat`, { signal: AbortSignal.timeout(2000) });
    return res.ok;
  } catch {
    return false;
  }
}

Prevention

When it happens

Trigger: The one-document addDocuments call for a user prompt reports 0 written — Chroma request failed or was tolerated as a batch failure.

Common situations: Chroma temporarily unreachable during prompt capture, embedder error, timeout on a large prompt.

Related errors


AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20). Data as JSON: /api/errors/04ac3a2a91774c8d. Report an issue: GitHub.