{"record":{"id":"746ff3fe334848b4","repo":"multica-ai/multica","slug":"workspace-q-not-found-or-you-do-not-have-access","errorCode":null,"errorMessage":"workspace %q not found or you do not have access; run 'multica workspace list' to see options","messagePattern":"workspace %q not found or you do not have access; run 'multica workspace list' to see options","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_workspace.go","lineNumber":400,"sourceCode":"\t// surprises from arbitrary substrings.\n\tif prefix, err := normalizeUUIDPrefix(target); err == nil {\n\t\tmatches := make([]workspaceSummary, 0, 1)\n\t\tfor _, ws := range workspaces {\n\t\t\tif strings.HasPrefix(compactUUID(ws.ID), prefix) {\n\t\t\t\tmatches = append(matches, ws)\n\t\t\t}\n\t\t}\n\t\tswitch len(matches) {\n\t\tcase 0:\n\t\t\t// fall through to the not-found error below\n\t\tcase 1:\n\t\t\treturn matches[0], nil\n\t\tdefault:\n\t\t\treturn workspaceSummary{}, ambiguousWorkspacePrefixError(target, matches)\n\t\t}\n\t}\n\n\treturn workspaceSummary{}, fmt.Errorf(\"workspace %q not found or you do not have access; run 'multica workspace list' to see options\", target)\n}\n\nfunc ambiguousWorkspacePrefixError(input string, matches []workspaceSummary) error {\n\tparts := make([]string, 0, len(matches))\n\tfor _, m := range matches {\n\t\tlabel := m.Name\n\t\tif m.Slug != \"\" {\n\t\t\tlabel = fmt.Sprintf(\"%s (%s)\", m.Name, m.Slug)\n\t\t}\n\t\tparts = append(parts, fmt.Sprintf(\"  %s  %s\", m.ID, label))\n\t}\n\treturn fmt.Errorf(\"ambiguous workspace id prefix %q; matches:\\n%s\\nUse more characters, the slug, or the full UUID\", input, strings.Join(parts, \"\\n\"))\n}\n\n// resolveWorkspaceRef fetches the caller's workspaces and resolves the input\n// (UUID, slug, or short UUID prefix) to a workspaceSummary. Shared by\n// `workspace get`, `workspace update`, `workspace member list`, and\n// `workspace switch` so all four accept the same identifiers users see in","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_workspace.go#L382-L418","documentation":"The identifier given to a workspace subcommand matched none of the caller's visible workspaces by exact UUID, exact slug (case-insensitive), or ≥4-hex-char UUID prefix. Because the server only returns workspaces the user is a member of, 'no match' deliberately conflates not-exists and no-access to avoid leaking workspace existence.","triggerScenarios":"`multica workspace get <uuid|slug|prefix>` where the target was deleted, the slug is misspelled, the prefix is under 4 chars or non-hex, or the workspace belongs to another account/you were removed as a member.","commonSituations":"Stale UUIDs copied from old tickets or another environment (prod vs local), membership revoked between commands, typos in slugs, prefixes shorter than the 4-char minimum.","solutions":["Run `multica workspace list` and copy the exact ID or slug from the output.","If recently removed from the workspace, ask an admin to re-add you.","For prefixes, use at least 4 hex characters; if ambiguous you'll get the dedicated ambiguity error listing matches.","Verify you are authenticated as the intended user (`multica user profile get`)."],"exampleFix":"# before\nmultica workspace get my-tean   # typo\n\n# after\nmultica workspace list   # copy exact slug/id\nmultica workspace get my-team","handlingStrategy":"validation","validationCode":"multica workspace list --output json | grep -qF \"$WS_ID\" && echo 'target visible' || echo 'target absent: expect not-found/no-access'","typeGuard":null,"tryCatchPattern":"out=$(multica workspace get \"$WS_ID\" 2>&1) || { case \"$out\" in *not\\ found*) echo 'recheck id via workspace list'; exit 1 ;; *) echo \"$out\"; exit 1 ;; esac; }","preventionTips":["Always source identifiers from `workspace list` output, never from memory or old tickets.","Use full UUIDs in automation to eliminate typo/prefix failures.","Remember membership loss and deletion produce the identical error by design."],"tags":["cli","validation","workspace","authorization"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}