thedotmack/claude-mem · warning
Invalid ${settingName} in settings.json, using default
Error message
Invalid ${settingName} in settings.json, using default What it means
With no env override present, the timeout setting is read from worker settings (settings.json) and run through parseBoundedTimeout. A null result (non-numeric, or numeric but outside min/max) triggers this warning echoing the stored value, and the default is used instead.
Source
Thrown at src/shared/worker-utils.ts:121
const envVal = process.env[settingName];
if (envVal !== undefined) {
const parsed = parseBoundedTimeout(envVal, bounds);
if (parsed !== null) {
return parsed;
}
logger.warn('SYSTEM', `Invalid ${settingName}, using default`, {
value: envVal, min: bounds.min, max: bounds.max
});
return defaultValue;
}
const settingsValue = getWorkerSettings()[settingName];
const parsed = parseBoundedTimeout(settingsValue, bounds);
if (parsed !== null) {
return parsed;
}
logger.warn('SYSTEM', `Invalid ${settingName} in settings.json, using default`, {
value: settingsValue, min: bounds.min, max: bounds.max
});
return defaultValue;
}
export function getWorkerPort(): number {
if (cachedPort !== null) {
return cachedPort;
}
const settings = getWorkerSettings();
cachedPort = parseInt(settings.CLAUDE_MEM_WORKER_PORT, 10);
return cachedPort;
}
export function getWorkerHost(): string {
if (cachedHost !== null) {
return cachedHost;View on GitHub (pinned to 8bc631a71a)
Solutions
- Edit settings.json so the key is a bare integer (milliseconds) within the min/max shown in the log.
- Or delete the key to fall back to the built-in default.
- Validate the file's JSON syntax after editing.
Example fix
// settings.json — before
{ "HEALTH_CHECK_TIMEOUT_MS": "10s" }
// after
{ "HEALTH_CHECK_TIMEOUT_MS": 10000 } Defensive patterns
Strategy: validation
Validate before calling
const settingsValue = getWorkerSettings()[settingName];
if (parseBoundedTimeout(settingsValue, bounds) === null) {
// invalid entry in settings.json — fix or drop the key before it silently becomes a default
} Type guard
const isNumericSettingsValue = (v: unknown): v is number => typeof v === 'number' && Number.isFinite(v);
Prevention
- Keep timeout keys in settings.json as numbers (milliseconds), never strings with units.
- Validate settings.json after hand edits (JSON.parse check) and again against min/max bounds from logs.
- When upgrading claude-mem, re-check bounds — older values may fall outside the new window.
When it happens
Trigger: settings.json contains a string like "30s", a number outside the allowed window, or a malformed value for a timeout key such as the health/readiness timeouts.
Common situations: Hand-editing settings.json with units or strings; values carried over from an older version whose bounds differed; JSON type mistakes (string vs number).
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
- Invalid ${envName}, using default
- Invalid ${CHROMA_PREWARM_TIMEOUT_SETTING}, using default
- Invalid ${settingName}, using default
- Worker is healthy but not ready; skipping hook API call
- Worker port did not open after lazy-spawn within the cold-bo
AI-assisted analysis of thedotmack/claude-mem@8bc631a71a (2026-08-20).
Data as JSON: /api/errors/3888085fcfa2c4df.
Report an issue: GitHub.