multica-ai/multica · error

resolve profile dir: %w

Error message

resolve profile dir: %w

What it means

Error "resolve profile dir: %w" thrown in multica-ai/multica.

Source

Thrown at server/internal/cli/config.go:242

	if profile == "" {
		if taskLocal {
			return filepath.Join(root, "config.json"), nil
		}
		return filepath.Join(root, defaultCLIConfigPath), nil
	}
	if taskLocal {
		return filepath.Join(root, "profiles", profile, "config.json"), nil
	}
	return filepath.Join(root, ".multica", "profiles", profile, "config.json"), nil
}

// ProfileDir returns the base directory for a profile's state files (pid, log).
// An empty profile returns ~/.multica/. A named profile returns ~/.multica/profiles/<name>/.
// Task invocations resolve the equivalent paths below TaskConfigRootEnv.
func ProfileDir(profile string) (string, error) {
	root, taskLocal, err := multicaConfigRoot()
	if err != nil {
		return "", fmt.Errorf("resolve profile dir: %w", err)
	}
	if taskLocal {
		if err := validateTaskLocalProfile(profile); err != nil {
			return "", fmt.Errorf("resolve profile dir: %w", err)
		}
	}
	if profile == "" {
		if taskLocal {
			return root, nil
		}
		return filepath.Join(root, ".multica"), nil
	}
	if taskLocal {
		return filepath.Join(root, "profiles", profile), nil
	}
	return filepath.Join(root, ".multica", "profiles", profile), nil
}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Check the profile directory path configuration and permissions.

When it happens

Trigger: Thrown at server/internal/cli/config.go:242 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/6a4b6d09fcf3c596. Report an issue: GitHub.