Fission-AI/OpenSpec · error · Error

Missing required option --change. Available changes

Error message

Missing required option --change. Available changes:
  ${available.join('\n  ')}

What it means

Guard in statusCommand: --change was omitted even though active changes exist (the no-changes case is handled separately with a friendly message). Thrown after listing available changes so the user can rerun with a valid --change value.

Solutions

  1. Run openspec status --change <id> with a listed ID
  2. Run interactively to get a selection prompt
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/commands/workflow/status.ts:83 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/837958c35f88e544. Report an issue: GitHub.

Appendix: source

Thrown at src/commands/workflow/status.ts:83

      const available = await getAvailableChanges(projectRoot, root.changesDir);
      if (available.length === 0) {
        spinner?.stop();
        if (options.json) {
          console.log(
            JSON.stringify(
              { changes: [], message: 'No active changes.', root: rootOutput },
              null,
              2
            )
          );
          return;
        }
        console.log(`No active changes. Create one with: ${newChangeHint}`);
        return;
      }
      // Changes exist but --change not provided
      spinner?.stop();
      throw new Error(
        `Missing required option --change. Available changes:\n  ${available.join('\n  ')}`
      );
    }

    const changeName = await validateChangeExists(
      options.change,
      projectRoot,
      root.changesDir,
      { newChangeHint }
    );

    // Validate schema if explicitly provided
    if (options.schema) {
      validateSchemaExists(options.schema, projectRoot);
    }

    // loadChangeContext will auto-detect schema from metadata if not provided
    const context = loadChangeContext(projectRoot, changeName, options.schema, {

View on GitHub (pinned to 6926ccb18a)