thedotmack/claude-mem · error

CMEM Pro requires a signed-in claude-mem account.

Error message

CMEM Pro requires a signed-in claude-mem account.

What it means

Choosing the 'cmem' (CMEM Pro) provider requires pairing credentials from a signed-in claude-mem account. The install flow receives a `pairing` object from the login/pairing step; if it is null, enrolling against nothing would corrupt configuration, so the code throws. A comment notes the flag path that skips login forces provider 'claude', so in normal flow this is defensive.

Source

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

        p.cancel('Installation cancelled.');
        process.exit(1);
      }
      if (providerResult.length === 1) {
        selectedProvider = providerResult[0];
        break;
      }
      log.warn('Select exactly one provider.');
    }
  }

  // CMEM Pro: no new provider code. The worker's OpenRouter client is a generic
  // OpenAI-compatible client whose endpoint and model both come from settings,
  // so "use the CMEM observer model" is four settings writes and nothing else.
  if (selectedProvider === 'cmem') {
    if (!pairing) {
      // Unreachable via the flag that skips login (it forces 'claude'), but a
      // future caller passing null here would otherwise enroll against nothing.
      throw new Error('CMEM Pro requires a signed-in claude-mem account.');
    }
    // The billing disclosure lives on the checkout page, not here. It is a term
    // of the charge, so it belongs on the screen that takes the payment method,
    // where it can be shown next to the price and the card field. Re-asking for
    // it in the terminal made the user consent twice to the same thing, before
    // ever seeing what they were agreeing to.
    const enrollment = await completeCmemTrialPairing(pairing, version);
    if (!enrollment) {
      p.cancel('CMEM Pro setup was not completed. Run npx claude-mem install to try again.');
      process.exit(1);
    }
    const cmemCredentials = resolveCmemMemoryCredentials(enrollment, persistedSettings);
    if (!cmemCredentials) {
      p.cancel('CMEM Pro did not return memory credentials. Run npx claude-mem install to try again.');
      process.exit(1);
    }

    const wrote = mergeSettings(buildCmemActivationSettings(cmemCredentials));

View on GitHub (pinned to 8bc631a71a)

Solutions

  1. Sign in to your claude-mem account first (run the login step) so pairing credentials are produced, then rerun install with provider cmem
  2. Choose provider 'claude' instead if you intend to skip login
  3. If invoking the installer programmatically, pass the pairing result from the pairing/login API rather than null

Example fix

// before
await configureProvider({ provider: 'cmem', pairing: null });
// after
const pairing = await loginAndPair();
await configureProvider({ provider: 'cmem', pairing });
Defensive patterns

Strategy: try-catch

Validate before calling

if (provider === 'cmem' && pairing == null) {
  throw new Error('cmem provider requires completing login/pairing first');
}

Type guard

const hasPairing = (p: unknown): p is Pairing =>
  typeof p === 'object' && p !== null && 'memoryKey' in p;

Try / catch

try {
  await configureProvider({ provider, pairing });
} catch (e) {
  if (e.message === 'CMEM Pro requires a signed-in claude-mem account.') {
    await loginAndPair();
    await configureProvider({ provider, pairing: getPairing() });
  } else throw e;
}

Prevention

When it happens

Trigger: Selected provider is 'cmem' but the pairing argument is null — only reachable if a future/alternate caller passes null pairing instead of routing through the login-skip path that forces 'claude'.

Common situations: Custom scripts or plugins invoking the install routine directly with pairing=null while selecting cmem; account session expiring or login being skipped by a path that does not also force the provider away from cmem.

Related errors


AI-assisted analysis of thedotmack/claude-mem@8bc631a71a (2026-09-09). Data as JSON: /api/errors/a9b7ea5ebc244680. Report an issue: GitHub.