{"record":{"id":"3b5d70578eae74dc","repo":"multica-ai/multica","slug":"daemon-disk-usage-workspaces-root-is-not-availab","errorCode":null,"errorMessage":"daemon disk-usage --workspaces-root is not available inside a daemon-managed task","messagePattern":"daemon disk-usage --workspaces-root is not available inside a daemon-managed task","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":1842,"sourceCode":"\t\tprintDiskUsageOtherRootsHint(os.Stdout, report, profile, rootOverride, taskContext)\n\t\treturn nil\n\t}\n\tprintDiskUsageTaskTable(os.Stdout, report)\n\tprintDiskUsageOtherRootsHint(os.Stdout, report, profile, rootOverride, taskContext)\n\treturn nil\n}\n\n// checkTaskDiskUsageScope keeps a managed task's disk-usage view inside the\n// daemon root that hosts it. Each rejected input widens the report past that\n// boundary: --all-profiles enumerates ~/.multica/profiles and discloses the\n// Owner's profile names, while --workspaces-root and --profile aim the scan at\n// a directory this daemon does not manage.\nfunc checkTaskDiskUsageScope(profile, rootOverride string, allProfiles bool) error {\n\tswitch {\n\tcase allProfiles:\n\t\treturn fmt.Errorf(\"daemon disk-usage --all-profiles is not available inside a daemon-managed task\")\n\tcase rootOverride != \"\":\n\t\treturn fmt.Errorf(\"daemon disk-usage --workspaces-root is not available inside a daemon-managed task\")\n\tcase profile != \"\":\n\t\treturn fmt.Errorf(\"daemon disk-usage --profile is not available inside a daemon-managed task\")\n\t}\n\treturn nil\n}\n\n// resolveDiskUsageRoot picks the directory to scan. A managed task reads the\n// daemon-injected root only: ResolveWorkspacesRoot falls back to a $HOME- and\n// profile-derived default, which for a task hosted by a named-profile daemon\n// resolves to the default root and reports a tree the task has nothing to do\n// with. Failing closed on a missing value keeps that guess out of the output.\nfunc resolveDiskUsageRoot(taskContext bool, profile, rootOverride string) (string, error) {\n\tif !taskContext {\n\t\treturn resolveWorkspacesRootForProfile(profile, rootOverride)\n\t}\n\troot := strings.TrimSpace(os.Getenv(daemon.TaskWorkspacesRootEnv))\n\tif root == \"\" {\n\t\treturn \"\", fmt.Errorf(\"daemon-managed task requires the daemon-injected workspaces root in %s\", daemon.TaskWorkspacesRootEnv)","sourceCodeStart":1824,"sourceCodeEnd":1860,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L1824-L1860","documentation":"Error \"daemon disk-usage --workspaces-root is not available inside a daemon-managed task\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:1842 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run disk-usage without --workspaces-root outside a daemon-managed task."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}