{"record":{"id":"369a15e20bc18da9","repo":"multica-ai/multica","slug":"resolve-cli-config-path-w","errorCode":null,"errorMessage":"resolve CLI config path: %w","messagePattern":"resolve CLI config path: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/cli/config.go","lineNumber":217,"sourceCode":"type OpenClawOverride struct {\n\tBinaryPath string `json:\"binary_path,omitempty\"`\n\tStateDir   string `json:\"state_dir,omitempty\"`\n}\n\n// CLIConfigPath returns the default path for the CLI config file.\nfunc CLIConfigPath() (string, error) {\n\treturn CLIConfigPathForProfile(\"\")\n}\n\n// CLIConfigPathForProfile returns the config file path for the given profile.\n// An empty profile returns the default path (~/.multica/config.json).\n// A named profile returns ~/.multica/profiles/<name>/config.json.\n// When TaskConfigRootEnv is set by the daemon, the same profile layout is\n// rooted directly below that private task directory instead of the user's home.\nfunc CLIConfigPathForProfile(profile string) (string, error) {\n\troot, taskLocal, err := multicaConfigRoot()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"resolve CLI config path: %w\", err)\n\t}\n\tif taskLocal {\n\t\tif err := validateTaskLocalProfile(profile); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"resolve CLI config path: %w\", err)\n\t\t}\n\t}\n\tif profile == \"\" {\n\t\tif taskLocal {\n\t\t\treturn filepath.Join(root, \"config.json\"), nil\n\t\t}\n\t\treturn filepath.Join(root, defaultCLIConfigPath), nil\n\t}\n\tif taskLocal {\n\t\treturn filepath.Join(root, \"profiles\", profile, \"config.json\"), nil\n\t}\n\treturn filepath.Join(root, \".multica\", \"profiles\", profile, \"config.json\"), nil\n}\n","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/cli/config.go#L199-L235","documentation":"Error \"resolve CLI config path: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/cli/config.go:217 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the config path environment (HOME or MULTICA_CONFIG_HOME) and permissions."],"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"}