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
- Set the value to a plain integer of milliseconds between 1 and 600000, e.g. 30000.
- Remove the setting entirely to use the default.
- 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
- Use bare milliseconds — no units — in the env var.
- Validate the setting right after changing it instead of waiting for the startup warn.
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.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Invalid ${envName}, using default
- Invalid CLAUDE_MEM_QUEUE_ENGINE=${raw}; expected sqlite or b
- Invalid CLAUDE_MEM_REDIS_MODE=${value}; expected external, m
- Invalid CLAUDE_MEM_REDIS_PORT=${value}; expected a TCP port
- CLAUDE_MEM_REDIS_URL must use redis:// or rediss://
AI-assisted analysis of thedotmack/claude-mem@8bc631a71a (2026-08-20).
Data as JSON: /api/errors/1d6a1da64dd43fb3.
Report an issue: GitHub.