Fission-AI/OpenSpec · error · StoreError

store_id_conflict

store_id_conflict

Error message

Store '${id}' is already registered at ${getStoreRootForBackend(entry.backend)}. One checkout per store id is supported on this machine.

What it means

Thrown by assertNoRegisteredStoreConflict when registering store id 'id' would map it to a second checkout path. The registry enforces one checkout per store id per machine so commands cannot silently operate on the wrong clone.

Solutions

  1. Use the existing registration at the path shown in the message
  2. Run 'openspec store unregister <id>' first, then register the new checkout
  3. Register the new checkout under a different id
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/store/registry.ts:101 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/4153b304f9f239d8. Report an issue: GitHub.

Appendix: source

Thrown at src/core/store/registry.ts:101

  }
}

export function assertNoRegisteredStoreConflict(
  registry: StoreRegistryState | null,
  id: string,
  backend: StoreGitBackendConfig
): void {
  const nextPath = normalizePathForComparison(getStoreRootForBackend(backend));

  for (const entry of listStoreRegistryEntries(registry ?? { version: 1, stores: {} })) {
    const entryPath = normalizePathForComparison(getStoreRootForBackend(entry.backend));

    if (entry.id === id && entryPath === nextPath) {
      continue;
    }

    if (entry.id === id) {
      throw new StoreError(
        `Store '${id}' is already registered at ${getStoreRootForBackend(entry.backend)}. One checkout per store id is supported on this machine.`,
        'store_id_conflict',
        {
          target: 'store.id',
          fix: `Use the existing registration, or run openspec store unregister ${id} first to switch this id to a different checkout.`,
        }
      );
    }

    if (entryPath === nextPath) {
      throw new StoreError(
        `Store path is already registered as '${entry.id}'.`,
        'store_path_conflict',
        {
          target: 'store.root',
          fix: `Use the existing '${entry.id}' registration or choose a different path.`,
        }
      );

View on GitHub (pinned to 6926ccb18a)