multica-ai/multica · error
workspace id, slug, or id prefix is required
Error message
workspace id, slug, or id prefix is required
What it means
resolveWorkspaceByIDOrSlug was called with an empty target (after trimming). This helper resolves UUID / slug / prefix identifiers for workspace subcommands, and an empty string cannot identify anything, so it fails before fetching the workspace list.
Source
Thrown at server/cmd/multica/cmd_workspace.go:362
var ws map[string]any
if err := client.PostJSON(ctx, "/api/workspaces", body, &ws); err != nil {
return fmt.Errorf("create workspace: %w", err)
}
return printWorkspace(cmd, ws)
}
// resolveWorkspaceByIDOrSlug looks up a workspace in the caller's accessible
// list by full UUID, slug (case-insensitive), or short UUID prefix (≥4 hex
// chars). The matching order is exact UUID → exact slug → prefix, so a slug
// that happens to be a hex string can never be shadowed by a colliding UUID
// prefix. Returns an error if no workspace matches, which doubles as the
// "access denied / does not exist" check — the server only returns workspaces
// the user is a member of, so a match implies access.
func resolveWorkspaceByIDOrSlug(workspaces []workspaceSummary, target string) (workspaceSummary, error) {
target = strings.TrimSpace(target)
if target == "" {
return workspaceSummary{}, fmt.Errorf("workspace id, slug, or id prefix is required")
}
// Slug comparison is case-insensitive (slugs are stored lowercase on the
// server, but tolerate user-typed uppercase). UUIDs are also case-
// insensitive in canonical form, so the lowering is safe for both.
lowered := strings.ToLower(target)
for _, ws := range workspaces {
if strings.ToLower(ws.ID) == lowered {
return ws, nil
}
}
for _, ws := range workspaces {
if ws.Slug != "" && strings.ToLower(ws.Slug) == lowered {
return ws, nil
}
}
// Fall back to short UUID prefix matching, so values copied from
// `workspace list`'s default (truncated) ID column round-trip back intoView on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass a non-empty identifier: full UUID, slug, or a short UUID prefix of at least 4 hex chars.
- Set MULTICA_WORKSPACE_ID where the command supports it, or run `multica workspace switch` once to establish a default.
- Script guard: fail before invoking when the identifier variable is empty.
Example fix
# before multica workspace get "" # after multica workspace get my-team # or a UUID / ≥4-char UUID prefix
Defensive patterns
Strategy: validation
Validate before calling
WS="$(echo "$WS" | tr -d ' ')"
[ -n "$WS" ] || { echo 'workspace identifier required'; exit 1; } Prevention
- Set MULTICA_WORKSPACE_ID or run `workspace switch` once per environment.
- Validate identifier variables are non-empty before passing them positionally.
When it happens
Trigger: Reached via resolveWorkspaceRef when a workspace subcommand (get/update/member list/switch) received an empty or whitespace-only identifier argument. Usually the argument itself is guarded earlier, so this is the last-resort backstop.
Common situations: Scripts passing an unset positional variable, e.g. `multica workspace get "$WS"` with WS empty.
Related errors
- --name is required
- --slug is required
- --description-stdin and --context-stdin cannot be combined;
- --issue-prefix cannot be empty; omit it to use the server-ge
- create workspace: %w
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/a1dfdf8aee355c33.
Report an issue: GitHub.