multica-ai/multica · warning

repository not found in workspace registry: %s

Error message

repository not found in workspace registry: %s

What it means

Returned by runRepoRemove after filtering the workspace registry: some of the URLs requested for removal were not present in ws.Repos, so nothing was removed for them and the command aborts before patching. This is an all-or-nothing guard — the PATCH is skipped, so even the URLs that did match stay in the registry.

Source

Thrown at server/cmd/multica/cmd_repo.go:310

	removedSet := make(map[string]struct{}, len(urls))
	removed := []workspaceRepo{}
	repos := make([]workspaceRepo, 0, len(ws.Repos))
	for _, repo := range ws.Repos {
		if _, ok := removeSet[repo.URL]; ok {
			removed = append(removed, repo)
			removedSet[repo.URL] = struct{}{}
			continue
		}
		repos = append(repos, repo)
	}
	missing := []string{}
	for _, u := range urls {
		if _, ok := removedSet[u]; !ok {
			missing = append(missing, u)
		}
	}
	if len(missing) > 0 {
		return fmt.Errorf("repository not found in workspace registry: %s", strings.Join(missing, ", "))
	}

	ws, err = patchWorkspaceRepos(ctx, client, workspaceID, repos)
	if err != nil {
		return err
	}

	result := repoMutationResult{
		WorkspaceID: ws.ID,
		Removed:     removed,
		Repos:       ws.Repos,
	}
	output, _ := cmd.Flags().GetString("output")
	if output == "json" {
		return cli.PrintJSON(os.Stdout, result)
	}
	rows := make([][]string, 0, len(removed))
	for _, repo := range removed {

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. List the registry first (`multica repo list`) and copy the exact URL string from its output for the remove command.
  2. Normalize your input to match the stored form exactly (with or without .git, same scheme).
  3. If some entries were already removed concurrently, re-run remove only for the entries still present.
  4. If you want best-effort removal, script it: check membership via `multica repo list --output json` first and remove only matching URLs.

Example fix

# before
multica repo remove https://github.com/acme/api   # registry stores https://github.com/acme/api.git

# after
multica repo list   # copy exact URL
multica repo remove https://github.com/acme/api.git
Defensive patterns

Strategy: validation

Validate before calling

# remove only URLs actually present in the registry
multica repo list --output json > /tmp/repos.json
jq -r '.repos[].url' /tmp/repos.json | grep -Fx "$URL" \
  && multica repo remove "$URL" \
  || echo "skip: $URL not in registry"

Prevention

When it happens

Trigger: Running `multica repo remove <url>` where <url> is not byte-identical to an entry in the workspace registry (trailing .git, scheme difference http/https, trailing slash, different case host), or removing a repo that was already removed by someone else after the fetch.

Common situations: Copy-pasting a GitHub HTTPS URL when the registry stores the SSH or .git form; concurrent edits from another agent/CLI; assuming fuzzy URL matching — the comparison is exact string match on repo.URL.

Related errors


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