thedotmack/claude-mem · warning
Prompt watermark bump skipped — write failed, row marked…
Error message
Prompt watermark bump skipped — write failed, row marked pending
What it means
syncUserPrompt writes a single prompt document; if addDocuments does not report exactly 1 written document, the prompts watermark is not advanced, the prompt id is marked pending, and this warning is logged so backfill retries it.
Solutions
- Check the Chroma client error behind written=0 in logs.
- Rely on the pending mark so the next backfill re-syncs the prompt.
- Verify Chroma connectivity and collection existence.
- If prompts are oversized, truncate or chunk prompt content before sync.
Defensive patterns
Strategy: fallback
Validate before calling
const written = await this.addDocuments([document]);
if (written !== 1) console.warn(`prompt write failed, written=${written}; pending retry expected`); Try / catch
try { await syncUserPrompt(...); }
catch (e) { /* row marked pending; backfill retries */ } Prevention
- Check Chroma availability before sync sessions
- Truncate oversized prompt content
- Treat written!==1 as retryable, not fatal
When it happens
Trigger: addDocuments([document]) returns written !== 1, i.e. 0 — the Chroma upsert failed entirely (connection error, invalid document, collection unavailable).
Common situations: Chroma down or restarting, oversized prompt content rejected, embedding failure for the prompt text.
Related errors
- Observation watermark bump skipped — partial write
- Observation watermark bump skipped — partial write, row…
- Prompt watermark bump skipped — write failed
- Summary watermark bump skipped — partial write
- Summary watermark bump skipped — partial write, row marked…
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/bfadc00b26e2f33e.
Report an issue: GitHub.
Appendix: source
Thrown at src/services/sync/ChromaSync.ts:626
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.clearPending(project, 'prompts', [promptId]);
ChromaSyncState.bump(project, 'prompts', promptId);
} else {
ChromaSyncState.markPending(project, 'prompts', [promptId]);
logger.warn('CHROMA_SYNC', 'Prompt watermark bump skipped — write failed, row marked pending', {
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 d8bc9755e7)