Fission-AI/OpenSpec · error · RootSelectionError

unknown_store

unknown_store

Error message

Unknown store '${id}'. Registered stores: ${entries.map((candidate) => candidate.id).join(', ')}.

What it means

A RootSelectionError with code 'unknown_store', thrown in resolveStoreRoot when the requested store id does not match any entry in the store registry, but other stores ARE registered. The message enumerates the ids that are actually available, so the fault is a mistyped or unregistered id.

Solutions

  1. Check the listed registered store ids and pass the correct one via --store
  2. Register the intended store with 'openspec store register <path> --id <id>'
  3. Run 'openspec store list' to inspect the registry state
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/root-selection.ts:177 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/f509676bdcfffb93. Report an issue: GitHub.

Appendix: source

Thrown at src/core/root-selection.ts:177

  } catch (error) {
    fromStoreError(error);
  }
  const entries = registry ? listStoreRegistryEntries(registry) : [];
  const entry = entries.find((candidate) => candidate.id === id);

  if (!entry) {
    if (entries.length === 0) {
      throw new RootSelectionError(
        `Unknown store '${id}'. No stores are registered.`,
        'no_registered_stores',
        {
          target: 'store.id',
          fix: `Run openspec store setup ${id} or openspec store register <path> first.`,
        }
      );
    }

    throw new RootSelectionError(
      `Unknown store '${id}'. Registered stores: ${entries
        .map((candidate) => candidate.id)
        .join(', ')}.`,
      'unknown_store',
      {
        target: 'store.id',
        fix: 'Pass a registered store id, or run openspec store list.',
      }
    );
  }

  const storeRoot = getStoreRootForBackend(entry.backend);
  const inspection = await inspectRegisteredStore(id, storeRoot);

  switch (inspection.kind) {
    case 'metadata_error':
      return fromStoreError(inspection.error);
    case 'metadata_missing':

View on GitHub (pinned to 6926ccb18a)