Fission-AI/OpenSpec · error · Error

Change '${name}' already exists at ${changeDir}

Error message

Change '${name}' already exists at ${changeDir}

What it means

Error "Change '${name}' already exists at ${changeDir}" thrown in Fission-AI/OpenSpec.

Source

Thrown at src/utils/change-utils.ts:167

    // Try to read from project config
    try {
      const config = readProjectConfig(projectRoot);
      schemaName = config?.schema ?? defaultSchema;
    } catch {
      // If config read fails, use default
      schemaName = defaultSchema;
    }
  }

  // Validate the resolved schema
  validateSchemaName(schemaName, projectRoot);

  // Build the change directory path
  const changeDir = path.join(options.changesDir ?? path.join(projectRoot, 'openspec', 'changes'), name);

  // Check if change already exists
  if (await FileSystemUtils.directoryExists(changeDir)) {
    throw new Error(`Change '${name}' already exists at ${changeDir}`);
  }

  const schema = resolveSchema(schemaName, projectRoot);
  const skipsSpecs = !schema.artifacts.some(artifact =>
    isSpecsArtifactPath(artifact.generates)
  );

  // Creating a change may scaffold or complete the root itself (an
  // implicit root, or a config-only/incomplete clone). Never leave a
  // half-root behind that doctor immediately calls unhealthy: ensure
  // specs/ and changes/archive/ exist, and write a config only when
  // none exists. The config records the PROJECT default schema, never
  // a one-change --schema override.
  const openspecDir = path.join(projectRoot, 'openspec');

  // Create the directory (including parent directories if needed)
  await FileSystemUtils.createDirectory(changeDir);
  await FileSystemUtils.createDirectory(path.join(openspecDir, 'specs'));

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/utils/change-utils.ts:167 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/0afa3ae71d8007fe. Report an issue: GitHub.