thedotmack/claude-mem · warning

Couldn't reach cmem.ai — start the trial later with npx clau

Error message

Couldn't reach cmem.ai — start the trial later with npx claude-mem install

What it means

While re-sending a cmem Pro trial sign-in link to a previously stored email, startTrialPairing() returned null — the HTTPS call to cmem.ai could not be completed (offline, DNS failure, timeout, non-2xx). The spinner shows 'Could not resend the sign-in link.', this warning (TRIAL_UNREACHABLE_WARNING) tells you to retry later via `npx claude-mem install`, and install continues normally. Nothing is persisted.

Source

Thrown at src/npx-cli/commands/install.ts:1602

    // is 30 minutes, so it has long expired), ask before sending a fresh one:
    // a silent resend would email the user (and start the 240s poll) on every
    // future install/update forever. Decline leaves state untouched, so the
    // offer repeats next time; CLAUDE_MEM_ONLINE_OPTIN=false kills it outright.
    if (prior.state !== 'link_sent') return null;

    const resendChoice = await p.confirm({
      message: `You started a cmem Pro trial earlier — send a fresh sign-in link to ${prior.email}?`,
      initialValue: false,
    });
    if (p.isCancel(resendChoice) || resendChoice !== true) return null;

    const spin = p.spinner();
    spin.start(`Resending your cmem Pro sign-in link to ${prior.email}…`);
    const resendStartedAt = Date.now();
    const pairing = await startTrialPairing(prior.email);
    if (!pairing) {
      spin.stop(styleText('yellow', 'Could not resend the sign-in link.'));
      log.warn(TRIAL_UNREACHABLE_WARNING);
      return null;
    }
    mergeSettings({ CLAUDE_MEM_PRO_TRIAL_AT: new Date().toISOString() });
    spin.stop('Sign-in link resent.');
    p.note(
      'Check your email — click the sign-in link and add a card ($0 today).\nInstall continues; we pick it up automatically.',
      'Link sent',
    );
    noteTrialUserCode(pairing);
    await captureCliEvent('trial_link_sent', { version, duration_ms: Date.now() - resendStartedAt });
    return pairing;
  }

  // The alt-path figure is live-fetched (with a bounded timeout and baked
  // fallback) so the pitch never quotes a stale price. Framing rule: never
  // print a $/1k figure for Pro itself — it is a flat subscription that does
  // not bill the user's tokens.
  const { rates } = await fetchBlendedRates();

View on GitHub (pinned to e2d1df569a)

Solutions

  1. Check connectivity (`curl -I https://cmem.ai`) and rerun `npx claude-mem install` — the resend offer reappears because your email is already stored.
  2. Behind a proxy: set HTTPS_PROXY/HTTP_PROXY so Node's fetch can reach cmem.ai.
  3. If cmem.ai is down, wait and retry; local claude-mem keeps working without Pro.
Defensive patterns

Strategy: retry

Validate before calling

// Check reachability before offering/attempting the resend flow:
async function reachable(url = 'https://cmem.ai'): Promise<boolean> {
  try { await fetch(url, { method: 'HEAD', signal: AbortSignal.timeout(3000) }); return true; }
  catch { return false; }
}
if (await reachable()) { /* safe to start pairing */ }
else { /* skip trial offer; local install proceeds */ }

Try / catch

const pairing = await startTrialPairing(email).catch(() => null);
if (!pairing) { warnUser('Could not resend — retry with `npx claude-mem install` later'); return null; }

Prevention

When it happens

Trigger: startTrialPairing(prior.email) failing due to no internet, corporate proxy blocking cmem.ai, cmem.ai down, or TLS interception rejecting the certificate. The prior confirm prompt must have been accepted first.

Common situations: Airplane mode / flaky café Wi-Fi during install; corporate networks with TLS-inspecting proxies; cmem.ai incident. The stored trial email means future installs will offer the resend again, so recovery is automatic.

Related errors


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