thedotmack/claude-mem · warning

Telemetry: WSL detection failed; reporting is_wsl=false

Error message

Telemetry: WSL detection failed; reporting is_wsl=false

What it means

Defensive catch inside detectWsl(), which checks WSL_DISTRO_NAME and os.release() for 'microsoft'. Neither call realistically throws on stock runtimes, so this warn signals an exotic runtime failure; the only consequence is is_wsl=false in telemetry person properties.

Source

Thrown at src/services/telemetry/common.ts:100

 * retention, stickiness, lifecycle, and cohort insights.
 */
export function buildPersonSet(
  scrubbed: Record<string, unknown>
): Record<string, unknown> {
  const set: Record<string, unknown> = {};
  for (const key of PERSON_PROPERTY_KEYS) {
    if (scrubbed[key] !== undefined) set[key] = scrubbed[key];
  }
  return set;
}

function detectWsl(): boolean {
  if (process.platform !== 'linux') return false;
  try {
    return Boolean(process.env.WSL_DISTRO_NAME) || os.release().toLowerCase().includes('microsoft');
  } catch (error) {
    const err = error instanceof Error ? error : new Error(String(error));
    logger.warn('SYSTEM', 'Telemetry: WSL detection failed; reporting is_wsl=false', undefined, err);
    return false;
  }
}

export function buildBaseProperties(): Record<string, unknown> {
  return {
    version: packageVersion,
    os: process.platform,
    // Kernel release: "10.0.22631" distinguishes Win10/Win11 builds, Darwin
    // major maps to the macOS release, Linux gives the kernel. os.release()
    // does not throw. System metadata only — never user data.
    os_version: os.release(),
    is_wsl: detectWsl(),
    arch: process.arch,
    runtime: process.versions.bun ? 'bun' : 'node',
    runtime_version: process.versions.bun ?? process.versions.node,
    node_version: process.versions.node,
    is_ci: Boolean(process.env.CI),

View on GitHub (pinned to e2d1df569a)

Solutions

  1. Ignore it — the impact is a single, slightly wrong telemetry attribute
  2. If it recurs, identify what runtime is executing the process (custom os shim) and report it upstream
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: A runtime or OS shim where process.env access or os.release() throws — effectively unreachable on standard Node/Bun builds.

Common situations: Never observed in practice; would appear only in heavily sandboxed or patched runtimes.

Related errors


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