multica-ai/multica · error · ErrRepoNotConfigured

repo is not configured for this workspace

Error message

repo is not configured for this workspace

What it means

Sentinel error ErrRepoNotConfigured in server/internal/daemon/daemon.go: ensureRepoReady refreshed the workspace's repo configuration from the server, then could not find the requested repo URL among the workspace's configured repos. The daemon will not clone/serve a repo the workspace has not been granted, so it fails closed. It is a configuration mismatch between what a task references and what the workspace allows.

Source

Thrown at server/internal/daemon/daemon.go:38

	"time"

	"golang.org/x/sync/errgroup"
	"golang.org/x/sync/singleflight"

	"github.com/multica-ai/multica/server/internal/cli"
	"github.com/multica-ai/multica/server/internal/daemon/execenv"
	"github.com/multica-ai/multica/server/internal/daemon/repocache"
	"github.com/multica-ai/multica/server/internal/selfexec"
	"github.com/multica-ai/multica/server/pkg/agent"
	"github.com/multica-ai/multica/server/pkg/redact"
	"github.com/multica-ai/multica/server/pkg/skillbundle"
	"github.com/multica-ai/multica/server/pkg/taskfailure"
)

// ErrRepoNotConfigured is returned by ensureRepoReady when the requested repo
// URL is not present in the workspace's repo configuration after a fresh
// server refresh.
var ErrRepoNotConfigured = errors.New("repo is not configured for this workspace")

// ErrNoRuntimesToRegister is returned by registerRuntimesForWorkspace when
// the daemon has nothing to host on a workspace — typically a custom-only
// daemon whose only enabled custom runtime profile was just disabled, leaving
// zero built-in agents and zero resolvable profiles. Callers must
// differentiate by intent: initial registration (syncWorkspacesFromAPI's
// new-workspace branch) treats this as a config error and skips the
// workspace until something changes; the profile-drift refresh path
// (refreshWorkspaceRuntimeProfiles) treats it as a legitimate converged
// state and explicitly deregisters the now-stale local runtime IDs so the
// server marks them offline immediately instead of waiting on the 150 s
// stale-heartbeat sweep.
var ErrNoRuntimesToRegister = errors.New("no agent runtimes could be registered")

// errTaskPrepareTimeout distinguishes the daemon's dispatched -> running
// startup deadline from provider execution timeouts. handleTask maps it to the
// platform-side timeout failure reason so the server's existing retry path can
// recover the task on a fresh attempt.

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Re-add the repo URL to the workspace's repo configuration (exact canonical URL), then retry the task.
  2. Compare the task's repo string with the configured one byte-for-byte — normalize .git suffix, scheme, and trailing slash.
  3. If the workspace was just created, give the server a moment to apply repo grants and re-sync before retrying.
  4. Cancel or re-target tasks that reference repos the workspace no longer has.
Defensive patterns

Strategy: validation

Validate before calling

// Canonicalize before comparing/creating tasks
func canonicalRepoURL(u string) string {
    u = strings.TrimSuffix(u, ".git")
    u = strings.TrimRight(u, "/")
    return strings.ToLower(strings.SplitN(u, "://", 2)[0]) + strings.SplitN(u, "://", 2)[1]
}

Try / catch

if errors.Is(err, daemon.ErrRepoNotConfigured) {
    // surface as workspace config guidance, not a transient failure
    return fmt.Errorf("repo %q is not in this workspace's repo list; add it in workspace settings", repoURL)
}

Prevention

When it happens

Trigger: A task or agent run references a repo URL that was removed from the workspace's repo config after the task was created; URL normalization mismatch (trailing .git, scheme case, trailing slash) between the task's repo string and the configured entry; fresh daemon syncing a workspace whose repo list is empty on the server.

Common situations: Repo removed/archived in workspace settings while queued tasks still reference it; repo URL stored with a different canonical form than the config; workspace provisioning races where the daemon asks before the server applied the repo grant.

Related errors


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