windmill-labs/windmill · error · Error

Workspace name conflict. Use --force to overwrite or choose

Error message

Workspace name conflict. Use --force to overwrite or choose a different name.

What it means

addWorkspace found an existing local workspace entry with the same name but pointing to a different remote/workspaceId; adding the new one under that name would shadow the old mapping. Without --force and outside interactive mode, it refuses rather than silently overwriting.

Source

Thrown at cli/src/commands/workspace/workspace.ts:362

      );
    } else {
      // Different remote or workspaceId - this is a conflict
      log.info(
        colors.red.bold(`❌ Workspace name "${workspace.name}" already exists!`)
      );
      log.info(
        `   Existing: ${nameConflict.workspaceId} on ${nameConflict.remote}`
      );
      log.info(`   New:      ${workspace.workspaceId} on ${workspace.remote}`);

      if (!isInteractive) {
        // In non-interactive mode (tests, scripts), auto-overwrite with force flag
        if (opts.force) {
          log.info(
            colors.yellow("Force flag enabled, overwriting existing workspace.")
          );
        } else {
          throw new Error(
            "Workspace name conflict. Use --force to overwrite or choose a different name."
          );
        }
      } else {
        const overwrite = await Confirm.prompt({
          message: "Do you want to overwrite the existing workspace?",
          default: false,
        });

        if (!overwrite) {
          log.info(colors.yellow("Operation cancelled."));
          return false;
        }
      }
    }
  }

  // Check 2: Same (remote, workspaceId) already exists with a different name

View on GitHub (pinned to e474e8803c)

Solutions

  1. Rerun with --force to overwrite the existing entry.
  2. Choose a different local name for the new workspace.
  3. Remove the conflicting entry first with `wmill workspace remove <name>`.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at cli/src/commands/workspace/workspace.ts:362 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/3595264a6af43d9c. Report an issue: GitHub.