multica-ai/multica · error

daemon disk-usage --workspaces-root is not available inside

Error message

daemon disk-usage --workspaces-root is not available inside a daemon-managed task

What it means

Error "daemon disk-usage --workspaces-root is not available inside a daemon-managed task" thrown in multica-ai/multica.

Source

Thrown at server/cmd/multica/cmd_daemon.go:1842

		printDiskUsageOtherRootsHint(os.Stdout, report, profile, rootOverride, taskContext)
		return nil
	}
	printDiskUsageTaskTable(os.Stdout, report)
	printDiskUsageOtherRootsHint(os.Stdout, report, profile, rootOverride, taskContext)
	return nil
}

// checkTaskDiskUsageScope keeps a managed task's disk-usage view inside the
// daemon root that hosts it. Each rejected input widens the report past that
// boundary: --all-profiles enumerates ~/.multica/profiles and discloses the
// Owner's profile names, while --workspaces-root and --profile aim the scan at
// a directory this daemon does not manage.
func checkTaskDiskUsageScope(profile, rootOverride string, allProfiles bool) error {
	switch {
	case allProfiles:
		return fmt.Errorf("daemon disk-usage --all-profiles is not available inside a daemon-managed task")
	case rootOverride != "":
		return fmt.Errorf("daemon disk-usage --workspaces-root is not available inside a daemon-managed task")
	case profile != "":
		return fmt.Errorf("daemon disk-usage --profile is not available inside a daemon-managed task")
	}
	return nil
}

// resolveDiskUsageRoot picks the directory to scan. A managed task reads the
// daemon-injected root only: ResolveWorkspacesRoot falls back to a $HOME- and
// profile-derived default, which for a task hosted by a named-profile daemon
// resolves to the default root and reports a tree the task has nothing to do
// with. Failing closed on a missing value keeps that guess out of the output.
func resolveDiskUsageRoot(taskContext bool, profile, rootOverride string) (string, error) {
	if !taskContext {
		return resolveWorkspacesRootForProfile(profile, rootOverride)
	}
	root := strings.TrimSpace(os.Getenv(daemon.TaskWorkspacesRootEnv))
	if root == "" {
		return "", fmt.Errorf("daemon-managed task requires the daemon-injected workspaces root in %s", daemon.TaskWorkspacesRootEnv)

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Run disk-usage without --workspaces-root outside a daemon-managed task.

When it happens

Trigger: Thrown at server/cmd/multica/cmd_daemon.go:1842 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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