multica-ai/multica · error

--by-workspace and --by-task are mutually exclusive

Error message

--by-workspace and --by-task are mutually exclusive

What it means

Error "--by-workspace and --by-task are mutually exclusive" thrown in multica-ai/multica.

Source

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

// --- daemon disk-usage ---

func runDaemonDiskUsage(cmd *cobra.Command, _ []string) error {
	taskContext := inDaemonManagedExecutionContext()
	profile := resolveProfile(cmd)
	rootOverride, _ := cmd.Flags().GetString("workspaces-root")
	byWorkspace, _ := cmd.Flags().GetBool("by-workspace")
	byTask, _ := cmd.Flags().GetBool("by-task")
	top, _ := cmd.Flags().GetInt("top")
	output, _ := cmd.Flags().GetString("output")
	allProfiles, _ := cmd.Flags().GetBool("all-profiles")

	if taskContext {
		if err := checkTaskDiskUsageScope(profile, rootOverride, allProfiles); err != nil {
			return err
		}
	}
	if byWorkspace && byTask {
		return fmt.Errorf("--by-workspace and --by-task are mutually exclusive")
	}
	if top < 0 {
		return fmt.Errorf("--top must be a non-negative integer")
	}
	if allProfiles && rootOverride != "" {
		return fmt.Errorf("--all-profiles and --workspaces-root are mutually exclusive")
	}

	if allProfiles {
		return runDaemonDiskUsageAggregate(cmd, byWorkspace, top, output)
	}

	workspacesRoot, err := resolveDiskUsageRoot(taskContext, profile, rootOverride)
	if err != nil {
		return fmt.Errorf("resolve workspaces root: %w", err)
	}

	report, err := daemon.ScanDiskUsage(workspacesRoot, daemon.ArtifactPatternsFromEnv())

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Use either --by-workspace or --by-task, not both.

When it happens

Trigger: Thrown at server/cmd/multica/cmd_daemon.go:1778 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/6c269296dcda5062. Report an issue: GitHub.