Fission-AI/OpenSpec · error · RootSelectionError

no_root_with_registered_stores

no_root_with_registered_stores

Error message

No OpenSpec root found in the current directory or its ancestors. Registered stores: ${registeredIds.join(', ')}. Pass --store <id> to use one, or run openspec init to create a local root.

What it means

Error "No OpenSpec root found in the current directory or its ancestors. Registered stores: ${registeredIds.join(', ')}. Pass --store <id> to use one, or run openspec init to create a local root." thrown in Fission-AI/OpenSpec.

Source

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

  const defaultStore = getGlobalConfig().defaultStore;
  if (defaultStore) {
    return resolveDefaultStoreRoot(defaultStore, options.globalDataDir);
  }

  let registry;
  try {
    registry = await readStoreRegistryState(
      options.globalDataDir ? { globalDataDir: options.globalDataDir } : {}
    );
  } catch (error) {
    fromStoreError(error);
  }
  const registeredIds = registry
    ? listStoreRegistryEntries(registry).map((entry) => entry.id)
    : [];

  if (registeredIds.length > 0) {
    throw new RootSelectionError(
      `No OpenSpec root found in the current directory or its ancestors. Registered stores: ${registeredIds.join(', ')}. Pass --store <id> to use one, or run openspec init to create a local root.`,
      'no_root_with_registered_stores',
      {
        target: 'openspec.root',
        fix: `Rerun with --store <id> (registered: ${registeredIds.join(', ')}) or run openspec init.`,
      }
    );
  }

  if (options.allowImplicitRoot === false) {
    throw new RootSelectionError(
      'No OpenSpec root found from the current directory.',
      'no_openspec_root',
      { target: 'openspec.root', fix: 'Run openspec init to create a root here.' }
    );
  }

  return makeRoot(canonicalDirectory(startPath), 'implicit');

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/root-selection.ts:437 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/2a7f4306cdb38649. Report an issue: GitHub.