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
The 'cmem' provider (CMEM Pro) requires billing against a signed-in claude-mem account; installing for it needs a valid `pairing` object. The code throws if pairing is null. As the source comment notes, this is currently unreachable through the normal flag flow (the skip-login flag forces provider 'claude') but guards future callers passing null pairing.
Solutions
- Complete claude-mem account sign-in/pairing before selecting the cmem provider.
- If automating, use the documented skip-login path (which forces provider 'claude') or pass a valid pairing object.
- As a library caller, never pass null pairing when provider is 'cmem'; resolve credentials first.
Example fix
// before
await selectProvider({ provider: 'cmem', pairing: null });
// after
const pairing = await completeLogin();
await selectProvider({ provider: 'cmem', pairing }); Defensive patterns
Strategy: type-guard
Validate before calling
if (provider === 'cmem' && pairing == null) throw new Error('complete login/pairing before selecting cmem provider'); Type guard
function hasPairing(p: Pairing | null): p is Pairing { return p != null && typeof p === 'object' && 'token' in p; } Try / catch
try { await selectProvider(opts); } catch (e) { if (e.message.includes('CMEM Pro requires a signed-in')) { await login(); await selectProvider({ ...opts, pairing: currentPairing() }); } else throw e; } Prevention
- Always run the login/pairing step before provider selection in scripts
- Type the pairing parameter as non-nullable when provider is 'cmem'
- Prefer provider 'claude' in headless automation that skips login
When it happens
Trigger: selectProvider-style flow resolves selectedProvider === 'cmem' while the pairing argument is null/undefined — i.e. no signed-in account/pairing credentials were established before provider selection.
Common situations: Programmatic callers invoking the install provider-selection function without performing the login/pairing step; future refactorings that drop the skip-login coercion; test harnesses passing null pairing with provider 'cmem'.
Related errors
- API key prompt cancelled — falling back to Claude provider.
- auth_invalid
- auth_invalid
- BadRequest
- BadRequest
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/a9b7ea5ebc244680.
Report an issue: GitHub.
Appendix: source
Thrown at src/npx-cli/commands/install.ts:1151
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 d8bc9755e7)