{"record":{"id":"d18acf25a1bcfdf8","repo":"multica-ai/multica","slug":"resolve-workspaces-root-w","errorCode":null,"errorMessage":"resolve workspaces_root: %w","messagePattern":"resolve workspaces_root: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_config.go","lineNumber":173,"sourceCode":"\tcase \"server_url\":\n\t\tcfg.ServerURL = value\n\tcase \"app_url\":\n\t\tcfg.AppURL = value\n\tcase \"workspace_id\":\n\t\tcfg.WorkspaceID = value\n\tcase \"device_name\":\n\t\tcfg.DeviceName = value\n\tcase \"runtime_name\":\n\t\tcfg.RuntimeName = value\n\tcase \"workspaces_root\":\n\t\tvalue = strings.TrimSpace(value)\n\t\tif value == \"\" {\n\t\t\tcfg.WorkspacesRoot = \"\"\n\t\t\treturn nil\n\t\t}\n\t\troot, err := filepath.Abs(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"resolve workspaces_root: %w\", err)\n\t\t}\n\t\tcfg.WorkspacesRoot = root\n\tcase \"max_concurrent_tasks\":\n\t\tif value == \"\" {\n\t\t\tcfg.MaxConcurrentTasks = 0\n\t\t\treturn nil\n\t\t}\n\t\tn, err := strconv.Atoi(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"max_concurrent_tasks must be an integer: %w\", err)\n\t\t}\n\t\tif n < 0 {\n\t\t\treturn fmt.Errorf(\"max_concurrent_tasks must be >= 0 (got %d)\", n)\n\t\t}\n\t\tcfg.MaxConcurrentTasks = n\n\tcase \"poll_interval\":\n\t\tif value == \"\" {\n\t\t\tcfg.PollInterval = \"\"","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_config.go#L155-L191","documentation":"applyConfigSet for key workspaces_root calls filepath.Abs on the trimmed value. Abs almost never fails on Linux/macOS (it only errors when os.Getwd fails, e.g. the current directory was deleted), so this is a rare wrapper around an environment-level failure, not a path-syntax error.","triggerScenarios":"`multica config set workspaces_root <path>` executed from a working directory that has been removed (raced rm -rf), or on Windows where the path has an invalid volume syntax.","commonSituations":"Long-lived shell whose cwd was deleted by another process or cleanup script; CI steps that cd into a temp dir that gets pruned mid-job.","solutions":["cd into an existing directory and re-run the config set command.","Use an absolute path value so the result does not depend on cwd.","If it persists on Windows, check the path for a valid drive/volume prefix."],"exampleFix":"# before (from a deleted cwd)\nmultica config set workspaces_root ./ws\n# after (absolute path from a valid cwd)\nmultica config set workspaces_root /home/user/multica/ws","handlingStrategy":"validation","validationCode":"# sanity-check cwd before config set\ntest -d \"$PWD\" || { echo \"cwd deleted; cd elsewhere\" >&2; exit 2; }\nmultica config set workspaces_root \"$HOME/multica/ws\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass an absolute path for workspaces_root so resolution never depends on cwd.","In scripts, `cd \"$HOME\"` (or another stable dir) before running config commands."],"tags":["cli","config","filesystem","go"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}