thedotmack/claude-mem · warning

Summary watermark bump skipped — partial write, row marked…

Error message

Summary watermark bump skipped — partial write, row marked pending

What it means

syncSummary writes the summary's documents; if addDocuments reports fewer writes than documents.length, the summaries watermark is not bumped, the row is marked pending, and this warning is logged so the next backfill retries it.

Solutions

  1. Check addDocuments/Chroma logs for which document failed and why.
  2. Let the pending flag drive the next backfill retry — no manual action strictly required.
  3. Shrink summary chunk size so each batch is well under limits.
  4. Confirm Chroma is reachable and the collection accepts the payload size.
Defensive patterns

Strategy: fallback

Validate before calling

const written = await this.addDocuments(documents);
if (written !== documents.length) console.warn(`summary partial write ${written}/${documents.length}`);

Try / catch

try { await syncSummary(...); }
catch (e) { /* pending mark ensures retry on next backfill */ }

Prevention

When it happens

Trigger: addDocuments returns written < documents.length during a summary sync — partial batch acceptance or a failed document in the batch.

Common situations: Very large summary documents exceeding Chroma limits, transient Chroma connectivity drops mid-write, embedding failures for one chunk.

Related errors


AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17). Data as JSON: /api/errors/c0b1572197939f7e. Report an issue: GitHub.

Appendix: source

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

      created_at_epoch: createdAtEpoch
    };

    const documents = this.formatSummaryDocs(stored);

    logger.info('CHROMA_SYNC', 'Syncing summary', {
      summaryId,
      documentCount: documents.length,
      project
    });

    // Only bump on a confirmed full write — see syncObservation() for rationale.
    const written = await this.addDocuments(documents);
    if (written === documents.length) {
      ChromaSyncState.clearPending(project, 'summaries', [summaryId]);
      ChromaSyncState.bump(project, 'summaries', summaryId);
    } else {
      ChromaSyncState.markPending(project, 'summaries', [summaryId]);
      logger.warn('CHROMA_SYNC', 'Summary watermark bump skipped — partial write, row marked pending', {
        summaryId,
        project,
        requested: documents.length,
        written
      });
    }
  }

  private formatUserPromptDoc(prompt: StoredUserPrompt): ChromaDocument {
    return {
      id: `prompt_${prompt.id}`,
      document: prompt.prompt_text,
      metadata: {
        sqlite_id: prompt.id,
        doc_type: 'user_prompt',
        memory_session_id: prompt.memory_session_id,
        project: prompt.project,
        platform_source: prompt.platform_source,

View on GitHub (pinned to d8bc9755e7)