thedotmack/claude-mem · warning
[claude-mem] Worker GET
Error message
[claude-mem] Worker GET ${path} failed: ${message} What it means
workerGetText catches fetch rejections when GETting the claude-mem worker and logs this warning unless the error is ECONNREFUSED (worker not running, treated as normal). It returns null so callers fall back gracefully.
Solutions
- Verify the worker is running and reachable at WORKER_BASE_URL
- Check WORKER_BASE_URL scheme (http vs https) matches the worker's listener
- Read the logged message for the specific network error and fix accordingly
- Confirm DNS/proxy settings in the environment running the plugin
Example fix
// before const WORKER_BASE_URL = "https://127.0.0.1:37777"; // TLS error: worker is plain HTTP // after const WORKER_BASE_URL = "http://127.0.0.1:37777";
Defensive patterns
Strategy: fallback
Validate before calling
try { new URL(`${WORKER_BASE_URL}${path}`); } catch { console.warn('invalid worker URL'); } Type guard
function isFetchError(e: unknown): e is TypeError {
return e instanceof TypeError;
} Try / catch
try {
const text = await workerGetText(path);
if (text === null) {
// fall back to cached/local data
}
} catch (e) {
console.warn('worker unreachable', e);
} Prevention
- Match http/https scheme to the worker's actual listener
- Ensure DNS/proxy settings are correct in the runtime environment
- Design callers to tolerate null (worker optional)
When it happens
Trigger: The fetch call itself throws with a non-ECONNREFUSED error: DNS resolution failure, TLS handshake error, network timeout/abort, or a malformed URL causing fetch to reject.
Common situations: WORKER_BASE_URL hostname unresolvable; HTTPS configured against an HTTP-only worker (TLS error); transient network drop; firewall blocking the connection in an unexpected way (not plain refusal).
Related errors
- [claude-mem] Worker POST
- [claude-mem] Worker GET
- Failed to fetch logs
- Worker API error ( )
- classifyClaudeServerError
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/b6f4215b9d6118d0.
Report an issue: GitHub.
Appendix: source
Thrown at src/integrations/opencode-plugin/index.ts:143
const message = error instanceof Error ? error.message : String(error);
if (!message.includes("ECONNREFUSED")) {
console.warn(`[claude-mem] Worker POST ${path} failed: ${message}`);
}
});
}
async function workerGetText(path: string): Promise<string | null> {
try {
const response = await fetch(`${WORKER_BASE_URL}${path}`, { headers: JSON_HEADERS });
if (!response.ok) {
console.warn(`[claude-mem] Worker GET ${path} returned ${response.status}`);
return null;
}
return await response.text();
} catch (error: unknown) {
const message = error instanceof Error ? error.message : String(error);
if (!message.includes("ECONNREFUSED")) {
console.warn(`[claude-mem] Worker GET ${path} failed: ${message}`);
}
return null;
}
}
const contentSessionIdsByOpenCodeSessionId = new Map<string, string>();
const initializedSessionIds = new Set<string>();
const MAX_SESSION_MAP_ENTRIES = 1000;
function getOrCreateContentSessionId(openCodeSessionId: string): string {
if (!contentSessionIdsByOpenCodeSessionId.has(openCodeSessionId)) {
while (contentSessionIdsByOpenCodeSessionId.size >= MAX_SESSION_MAP_ENTRIES) {
const oldestKey = contentSessionIdsByOpenCodeSessionId.keys().next().value;
if (oldestKey !== undefined) {
contentSessionIdsByOpenCodeSessionId.delete(oldestKey);
initializedSessionIds.delete(oldestKey);
} else {View on GitHub (pinned to d8bc9755e7)