thedotmack/claude-mem · warning

Invalid ${CHROMA_PREWARM_TIMEOUT_SETTING}, using default

Error message

Invalid ${CHROMA_PREWARM_TIMEOUT_SETTING}, using default

What it means

Prewarm-timeout resolution reads env CLAUDE_MEM_CHROMA_PREWARM_TIMEOUT_MS (falling back to the user-settings file value) and requires an integer within [1, 600000] via parseBoundedTimeoutMs. A set-but-invalid value logs this warning (including the bad value and bounds) and falls back to DEFAULT_CHROMA_PREWARM_TIMEOUT_MS.

Source

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

      parsed <= CHROMA_PREWARM_TIMEOUT_BOUNDS.max
    ) {
      return parsed;
    }
    return null;
  }

  private static getChromaPrewarmTimeoutMs(): number {
    const settings = SettingsDefaultsManager.loadFromFile(USER_SETTINGS_PATH);
    const envValue = process.env[CHROMA_PREWARM_TIMEOUT_SETTING];
    const settingsValue = settings[CHROMA_PREWARM_TIMEOUT_SETTING];

    const parsed = ChromaMcpManager.parseBoundedTimeoutMs(envValue ?? settingsValue);
    if (parsed !== null) {
      return parsed;
    }

    if (envValue !== undefined || settingsValue) {
      logger.warn('CHROMA_MCP', `Invalid ${CHROMA_PREWARM_TIMEOUT_SETTING}, using default`, {
        value: envValue ?? settingsValue,
        min: CHROMA_PREWARM_TIMEOUT_BOUNDS.min,
        max: CHROMA_PREWARM_TIMEOUT_BOUNDS.max
      });
    }
    return DEFAULT_CHROMA_PREWARM_TIMEOUT_MS;
  }

  private static captureOutputTail(
    stream: { on(event: 'data', listener: (chunk: Buffer | string | Uint8Array) => void): unknown } | null | undefined,
  ): () => string {
    let tail = '';
    stream?.on('data', (chunk: Buffer | string | Uint8Array) => {
      const text = Buffer.isBuffer(chunk)
        ? chunk.toString()
        : chunk instanceof Uint8Array
          ? Buffer.from(chunk).toString()
          : String(chunk);

View on GitHub (pinned to 8bc631a71a)

Solutions

  1. Set the value to a plain integer of milliseconds between 1 and 600000, e.g. 30000.
  2. Remove the setting entirely to use the default.
  3. Check for duplicate definitions (settings file vs environment) so the intended one wins.

Example fix

# before
CLAUDE_MEM_CHROMA_PREWARM_TIMEOUT_MS=30s
# after
CLAUDE_MEM_CHROMA_PREWARM_TIMEOUT_MS=30000
Defensive patterns

Strategy: validation

Validate before calling

function parseTimeoutMs(raw: string | undefined): number | null {
  const n = raw !== undefined ? Number(raw) : NaN;
  return Number.isInteger(n) && n >= 1 && n <= 600_000 ? n : null;
}

Type guard

function isValidPrewarmTimeoutMs(value: unknown): value is number {
  return typeof value === 'number' && Number.isInteger(value) && value >= 1 && value <= 600_000;
}

Prevention

When it happens

Trigger: Setting CLAUDE_MEM_CHROMA_PREWARM_TIMEOUT_MS or the matching settings key to a non-integer ("30s"), 0, a negative number, or anything above 600000.

Common situations: Copying a timeout with units into the env var, entering seconds instead of milliseconds, or a stray typo.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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