Fission-AI/OpenSpec · error

Invalid profile " ". Available profiles: core, custom

Error message

Invalid profile "${this.profileOverride}". Available profiles: core, custom

What it means

Thrown by resolveProfileOverride when a --profile (profileOverride) value other than 'core' or 'custom' is supplied. Validation of the CLI input, not a filesystem state: the caller passed an unsupported profile name, and the error enumerates the two valid profiles.

Solutions

  1. Use --profile core or --profile custom
  2. Omit --profile to use the default profile selection
  3. Check for typos or shell quoting issues in the flag value
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/init.ts:444 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/23dccb0cd6b01b8f. Report an issue: GitHub.

Appendix: source

Thrown at src/core/init.ts:444

      });
      return { write: answer, persist: answer, optedOut: !answer, skippedUndecided: false };
    }

    // Non-interactive with no explicit signal: don't write, and leave the
    // decision unpersisted so a later interactive run can still prompt.
    return { write: false, optedOut: false, skippedUndecided: true };
  }

  private resolveProfileOverride(): Profile | undefined {
    if (this.profileOverride === undefined) {
      return undefined;
    }

    if (this.profileOverride === 'core' || this.profileOverride === 'custom') {
      return this.profileOverride;
    }

    throw new Error(`Invalid profile "${this.profileOverride}". Available profiles: core, custom`);
  }

  /**
   * Resolves the workflows the effective profile installs, so onboarding output
   * only mentions commands that will actually exist.
   */
  private getActiveWorkflows(): string[] {
    const globalCfg = getGlobalConfig();
    const activeProfile: Profile = this.resolveProfileOverride() ?? globalCfg.profile ?? 'core';
    return [...getProfileWorkflows(activeProfile, globalCfg.workflows)];
  }

  // ═══════════════════════════════════════════════════════════
  // LEGACY CLEANUP
  // ═══════════════════════════════════════════════════════════

  /**
   * Cleans repo-local legacy artifacts immediately and defers global Codex prompt

View on GitHub (pinned to 6926ccb18a)