multica-ai/multica · error

workspace ID is required: pass an id/slug/prefix as argument

Error message

workspace ID is required: pass an id/slug/prefix as argument or set MULTICA_WORKSPACE_ID

What it means

`multica workspace get` specifically requires a target: resolveWorkspaceArg returned an empty ID, meaning no positional argument was given, no default was resolvable, and MULTICA_WORKSPACE_ID is unset. This is a later, command-specific restatement of the empty-identifier checks so the user gets an actionable message naming both remediation routes.

Source

Thrown at server/cmd/multica/cmd_workspace.go:488

		}
		ctx, cancel := cli.APIContext(context.Background())
		defer cancel()
		ws, err := resolveWorkspaceRef(ctx, cmd, trimmed)
		if err != nil {
			return "", err
		}
		return ws.ID, nil
	}
	return resolveWorkspaceID(cmd), nil
}

func runWorkspaceGet(cmd *cobra.Command, args []string) error {
	wsID, err := resolveWorkspaceArg(cmd, args)
	if err != nil {
		return err
	}
	if wsID == "" {
		return fmt.Errorf("workspace ID is required: pass an id/slug/prefix as argument or set MULTICA_WORKSPACE_ID")
	}

	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

	var ws map[string]any
	if err := client.GetJSON(ctx, "/api/workspaces/"+wsID, &ws); err != nil {
		return fmt.Errorf("get workspace: %w", err)
	}

	return printWorkspace(cmd, ws)
}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Pass the identifier explicitly: `multica workspace get <id|slug|prefix>`.
  2. Export MULTICA_WORKSPACE_ID in your shell/profile or CI environment.
  3. Run `multica workspace switch <id|slug|prefix>` once so future bare invocations inherit the default.

Example fix

# before
multica workspace get

# after
export MULTICA_WORKSPACE_ID=00000000-0000-0000-0000-000000000000
multica workspace get
Defensive patterns

Strategy: validation

Validate before calling

: "${WS:=${MULTICA_WORKSPACE_ID:-}}"
[ -n "$WS" ] || { echo 'pass <id|slug|prefix> or set MULTICA_WORKSPACE_ID'; exit 1; }

Prevention

When it happens

Trigger: Running `multica workspace get` bare on a machine with no switched default workspace and no MULTICA_WORKSPACE_ID; or with an argument that resolves to empty after trimming.

Common situations: New installs, CI containers, or after a logout/reset cleared the default-workspace pointer.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/713b4450da4ba66d. Report an issue: GitHub.