thedotmack/claude-mem · warning

Deep probe failed at query stage

Error message

Deep probe failed at query stage

What it means

Final probe stage: a real query against collection cm__claude-mem failed after listing succeeded. Errors matching /not exist|missing|empty|no such/i are normalized to 'collection missing or empty' — the expected first-run state before any documents sync. Any other error is a genuine query failure: embedding backend problems, timeouts, or collection corruption.

Source

Thrown at src/services/sync/ChromaMcpManager.ts:924

    }

    const queryStartedAt = Date.now();
    try {
      await this.callTool('chroma_query_documents', {
        collection_name: 'cm__claude-mem',
        query_texts: ['ping'],
        n_results: 1
      });
      const queryLatencyMs = Date.now() - queryStartedAt;
      return { ok: true, stage: 'done', collections, queryLatencyMs };
    } catch (error) {
      const queryLatencyMs = Date.now() - queryStartedAt;
      const rawMessage = error instanceof Error ? error.message : String(error);
      const isMissingOrEmpty = /not exist|missing|empty|no such/i.test(rawMessage);
      const errorMessage = isMissingOrEmpty
        ? `collection cm__claude-mem missing or empty (${rawMessage})`
        : rawMessage;
      logger.warn('CHROMA_MCP', 'Deep probe failed at query stage', {
        error: rawMessage,
        queryLatencyMs
      });
      return {
        ok: false,
        stage: 'query',
        error: errorMessage,
        collections,
        queryLatencyMs
      };
    }
  }

  /**
   * Singleton enforcement helper (#2313): tree-kill the currently tracked
   * chroma-mcp subprocess and reset all state so the next spawn starts clean.
   *
   * Why this is the singleton invariant: every code path that intends to

View on GitHub (pinned to 8bc631a71a)

Solutions

  1. If the normalized error says missing/empty on a fresh install, ignore it — the first sync creates the collection
  2. Otherwise inspect error plus queryLatencyMs: high latency points to resource pressure
  3. Trigger a sync/backfill so the collection is created, then re-probe
  4. For embedding-mismatch errors, back up and rebuild the chroma collection from source data
Defensive patterns

Strategy: validation

Validate before calling

const probe = await chromaManager.probeSemanticSearch();
if (!probe.ok && probe.stage === 'query') {
  if (/missing or empty/.test(probe.error ?? '')) {
    // first run before initial sync — expected, no action
  } else {
    // real query failure: inspect error and queryLatencyMs
  }
}

Prevention

When it happens

Trigger: Fresh install where cm__claude-mem was never created (benign); embedding function unavailable or dimensionality mismatched after a model change; chroma query timeout measured via queryLatencyMs; corrupted collection metadata.

Common situations: First run before initial sync; chroma rebuilt with a different embedding model; slow disks causing query timeouts.

Related errors


AI-assisted analysis of thedotmack/claude-mem@8bc631a71a (2026-08-20). Data as JSON: /api/errors/58d87b7c83350d09. Report an issue: GitHub.