thedotmack/claude-mem · info

Select exactly one provider.

Error message

Select exactly one provider.

What it means

During interactive install, the multi-select prompt for providers re-prompts with the warning 'Select exactly one provider.' when the user confirms a selection that is not exactly one provider. The installer requires a single provider because the worker's observer client is configured from one provider's settings; zero or multiple selections cannot be mapped to settings.

Source

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

          { 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 8bc631a71a)

Solutions

  1. Select exactly one provider in the prompt (toggle one item, deselect others) and confirm.
  2. Press Ctrl+C/escape if you want to abort the install instead of choosing.
  3. If you want a different provider configuration, change provider settings after install rather than selecting multiple.

Example fix

// before
? Providers (space to select, enter to confirm)
> [x] anthropic [x] openrouter  -> warn: Select exactly one provider.
// after
> [x] anthropic [ ] openrouter  -> proceeds
Defensive patterns

Strategy: validation

Validate before calling

function validProviderSelection(sel: string[]): boolean { return sel.length === 1; }
if (!validProviderSelection(selected)) console.warn('Select exactly one provider.');

Prevention

When it happens

Trigger: User is in the provider multi-select prompt and presses confirm with zero items selected or more than one item selected; the loop re-displays the prompt with this warning until exactly one is chosen (or the user aborts with exit code 1).

Common situations: User assumes multi-select is allowed and picks several providers; user presses enter on an empty list wanting to skip; confusion between required vs optional selection in the interactive flow.

Understand the failure class

Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.

Related errors


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