Fission-AI/OpenSpec · error · Error

buildLaunchCommand requires an absolute workspace-file path

Error message

buildLaunchCommand requires an absolute workspace-file path (got '${input.codeWorkspacePath}').

What it means

Error "buildLaunchCommand requires an absolute workspace-file path (got '${input.codeWorkspacePath}')." thrown in Fission-AI/OpenSpec.

Source

Thrown at src/core/openers.ts:345

 * absolute path (which also defuses the cursor shim's `agent`
 * first-arg hijack). attach-dirs: pre-args + one attach flag + path
 * pair per surviving member, the primary included (the locked "one
 * attach flag per member"); never a trailing positional - both agent
 * CLIs would read one as a starter prompt, which 7.1 locks out.
 */
export function buildLaunchCommand(
  opener: OpenerDefinition,
  input: { members: WorksetMember[]; codeWorkspacePath: string }
): LaunchCommand {
  if (input.members.length === 0) {
    throw new Error('buildLaunchCommand requires at least one member.');
  }

  // The no-hijack and no-positional guarantees lean on absolute paths
  // (the child resolves relative argv against its own cwd) - keep the
  // invariant local instead of three modules away.
  if (!path.isAbsolute(input.codeWorkspacePath)) {
    throw new Error(
      `buildLaunchCommand requires an absolute workspace-file path (got '${input.codeWorkspacePath}').`
    );
  }

  const cwd = input.members[0].path;

  if (opener.style === 'workspace-file') {
    return {
      executable: opener.command,
      args: [...opener.args, input.codeWorkspacePath],
      cwd,
      label: opener.label,
      style: opener.style,
    };
  }

  return {
    executable: opener.command,

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/openers.ts:345 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/24a0a771d46509b8. Report an issue: GitHub.