{"record":{"id":"67a5daf2bb5452e9","repo":"multica-ai/multica","slug":"daemon-managed-task-requires-the-daemon-injected-w","errorCode":null,"errorMessage":"daemon-managed task requires the daemon-injected workspaces root in %s","messagePattern":"daemon-managed task requires the daemon-injected workspaces root in (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":1860,"sourceCode":"\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)\n\t}\n\tif !filepath.IsAbs(root) {\n\t\treturn \"\", fmt.Errorf(\"%s must be an absolute path\", daemon.TaskWorkspacesRootEnv)\n\t}\n\treturn filepath.Clean(root), nil\n}\n\n// diskUsageNeedsParentStatus reports whether this invocation renders per-task\n// rows at all. The --by-workspace table has no STATUS column, so resolving\n// statuses for it would spend a network round trip — and, against an\n// unreachable server, a full timeout — on data nothing displays, turning a\n// local diagnostic into a command that hangs offline. JSON output always\n// carries the task array, so it still needs them even with --by-workspace.\nfunc diskUsageNeedsParentStatus(byWorkspace bool, output string) bool {\n\treturn !byWorkspace || output == \"json\"\n}\n\n// fillDiskUsageParentStatuses populates the report's STATUS column in place.","sourceCodeStart":1842,"sourceCodeEnd":1878,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L1842-L1878","documentation":"Error \"daemon-managed task requires the daemon-injected workspaces root in %s\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:1860 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The daemon-injected workspaces root is missing; run outside the task or fix the daemon environment."],"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-15T22:17:37.221Z"}