multica-ai/multica · error

resolve workspaces_root: %w

Error message

resolve workspaces_root: %w

What it means

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.

Source

Thrown at server/cmd/multica/cmd_config.go:173

	case "server_url":
		cfg.ServerURL = value
	case "app_url":
		cfg.AppURL = value
	case "workspace_id":
		cfg.WorkspaceID = value
	case "device_name":
		cfg.DeviceName = value
	case "runtime_name":
		cfg.RuntimeName = value
	case "workspaces_root":
		value = strings.TrimSpace(value)
		if value == "" {
			cfg.WorkspacesRoot = ""
			return nil
		}
		root, err := filepath.Abs(value)
		if err != nil {
			return fmt.Errorf("resolve workspaces_root: %w", err)
		}
		cfg.WorkspacesRoot = root
	case "max_concurrent_tasks":
		if value == "" {
			cfg.MaxConcurrentTasks = 0
			return nil
		}
		n, err := strconv.Atoi(value)
		if err != nil {
			return fmt.Errorf("max_concurrent_tasks must be an integer: %w", err)
		}
		if n < 0 {
			return fmt.Errorf("max_concurrent_tasks must be >= 0 (got %d)", n)
		}
		cfg.MaxConcurrentTasks = n
	case "poll_interval":
		if value == "" {
			cfg.PollInterval = ""

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. cd into an existing directory and re-run the config set command.
  2. Use an absolute path value so the result does not depend on cwd.
  3. If it persists on Windows, check the path for a valid drive/volume prefix.

Example fix

# before (from a deleted cwd)
multica config set workspaces_root ./ws
# after (absolute path from a valid cwd)
multica config set workspaces_root /home/user/multica/ws
Defensive patterns

Strategy: validation

Validate before calling

# sanity-check cwd before config set
test -d "$PWD" || { echo "cwd deleted; cd elsewhere" >&2; exit 2; }
multica config set workspaces_root "$HOME/multica/ws"

Prevention

When it happens

Trigger: `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.

Common situations: 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.

Related errors


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