{"record":{"id":"80230fb6117c22ef","repo":"musistudio/claude-code-router","slug":"fusion-vision-failed-to-publish-lightweight-usag","errorCode":null,"errorMessage":"[fusion-vision] Failed to publish lightweight usage event: ${formatError(lastError)}","messagePattern":"\\[fusion-vision\\] Failed to publish lightweight usage event: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/core/src/mcp/fusion-vision-mcp.ts","lineNumber":434,"sourceCode":"      }\n      const acknowledgement = rawBody ? parseJson(rawBody) : undefined;\n      if (isRecord(acknowledgement) && acknowledgement.applied === false) {\n        throw new FusionUsageSyncRejectedError();\n      }\n      usageSyncFailureLogged = false;\n      return;\n    } catch (error) {\n      lastError = error;\n      if (attempt >= fusionUsageSyncMaxAttempts || !usageSyncErrorIsRetryable(error)) {\n        break;\n      }\n      await wait(fusionUsageSyncBaseDelayMs * 2 ** (attempt - 1));\n    }\n  }\n\n  if (!usageSyncFailureLogged) {\n    usageSyncFailureLogged = true;\n    console.warn(`[fusion-vision] Failed to publish lightweight usage event: ${formatError(lastError)}`);\n  }\n}\n\nclass FusionUsageSyncHttpError extends Error {\n  readonly retryable: boolean;\n\n  constructor(readonly statusCode: number) {\n    super(`HTTP ${statusCode}`);\n    this.name = \"FusionUsageSyncHttpError\";\n    this.retryable = statusCode === 408 || statusCode === 409 || statusCode === 425 || statusCode === 429 || statusCode >= 500;\n  }\n}\n\nclass FusionUsageSyncRejectedError extends Error {\n  readonly retryable = false;\n\n  constructor() {\n    super(\"Usage sync endpoint rejected the event.\");","sourceCodeStart":416,"sourceCodeEnd":452,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/mcp/fusion-vision-mcp.ts#L416-L452","documentation":"The fusion-vision MCP tried multiple times to publish a lightweight usage event to the remote usage sync endpoint and every attempt failed; after retries exhausted it logs the last error once (guarded by a flag) and gives up. Usage telemetry for that event is lost but the MCP continues functioning.","triggerScenarios":"Network egress blocked to the usage endpoint; endpoint returning 5xx or auth failures across all retry attempts; proxy/DNS misconfiguration in the environment running the MCP.","commonSituations":"Corporate proxies blocking the telemetry host; expired credentials for the usage service; transient outage longer than the retry budget (exponential backoff exhausted).","solutions":["Check network connectivity and proxy settings from the host to the usage endpoint","Inspect the formatted error for HTTP status (401/403 = credentials, 5xx = upstream outage) and fix accordingly","If telemetry is intentionally blocked, suppress the warning or disable usage sync in config to avoid retry churn"],"exampleFix":"// before: no proxy configured, egress blocked\n// after: route via corporate proxy\nprocess.env.HTTPS_PROXY = \"http://proxy.corp:8080\";\nprocess.env.HTTP_PROXY = \"http://proxy.corp:8080\";","handlingStrategy":"retry","validationCode":"await fetch(usageEndpoint, { method: \"HEAD\" }).catch(() => { throw new Error(\"Usage endpoint unreachable\"); });","typeGuard":null,"tryCatchPattern":"try { await publishUsageEvent(event); } catch { /* telemetry is best-effort: log once, never fail the MCP call */ }","preventionTips":["Ensure network/proxy env vars are set for the host","Allowlist the telemetry endpoint in firewall rules","Treat usage-publish failures as non-fatal and rate-limited"],"tags":["telemetry","usage-sync","network","retry"],"backgroundTag":"telemetry-publish-failed","analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}