thedotmack/claude-mem · warning

Select exactly one provider.

Error message

Select exactly one provider.

What it means

In the interactive provider setup, the provider multi-select prompt loops until exactly one provider is selected. If the user confirms with zero or multiple providers selected, the installer logs this warning and re-prompts instead of proceeding.

Solutions

  1. Re-answer the prompt with exactly one provider checked, then confirm.
  2. Deselect extra pre-checked providers before pressing Enter.
  3. Configure additional providers in a second pass after install completes.
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: Confirming the provider multi-select (p.multiselect) with a selection whose length !== 1 — nothing selected, or more than one provider checked — inside the while loop after the length===1 fast path fails.

Common situations: Prompt defaults select multiple providers and the user just presses Enter; user tries to configure two BYO-key providers at once; clearing the selection then confirming.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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

Appendix: source

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

          { value: 'cmem', label: labels.cmem, hint: labels.cmemHint },
          { value: 'claude', label: labels.claude, hint: labels.claudeHint },
        ],
        // CMEM Pro pre-selected: it is the recommended path and the one the
        // funnel is built around. Selecting it no longer means "pay now" —
        // it opens the offer page to read first.
        initialValues: ['cmem'],
        required: true,
      });
      // @clack/prompts 1.8: isCancel narrows to unique CANCEL_SYMBOL, not generic symbol.
      if (p.isCancel(providerResult) || !Array.isArray(providerResult)) {
        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);

View on GitHub (pinned to d8bc9755e7)