{"record":{"id":"05345ac2c47dc08b","repo":"CoplayDev/unity-mcp","slug":"the-selected-claude-cli-executable-does-not-exist","errorCode":null,"errorMessage":"The selected Claude CLI executable does not exist","messagePattern":"The selected Claude CLI executable does not exist","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"MCPForUnity/Editor/Services/PathResolverService.cs","lineNumber":158,"sourceCode":"            if (!File.Exists(path))\n            {\n                throw new ArgumentException(\"The selected uvx executable does not exist\");\n            }\n\n            EditorPrefs.SetString(EditorPrefKeys.UvxPathOverride, path);\n        }\n\n        public void SetClaudeCliPathOverride(string path)\n        {\n            if (string.IsNullOrEmpty(path))\n            {\n                ClearClaudeCliPathOverride();\n                return;\n            }\n\n            if (!File.Exists(path))\n            {\n                throw new ArgumentException(\"The selected Claude CLI executable does not exist\");\n            }\n\n            EditorPrefs.SetString(EditorPrefKeys.ClaudeCliPathOverride, path);\n        }\n\n        public void ClearUvxPathOverride()\n        {\n            EditorPrefs.DeleteKey(EditorPrefKeys.UvxPathOverride);\n        }\n\n        public void ClearClaudeCliPathOverride()\n        {\n            EditorPrefs.DeleteKey(EditorPrefKeys.ClaudeCliPathOverride);\n        }\n\n        /// <summary>\n        /// Validates the provided uv executable by running \"--version\" and parsing the output.\n        /// </summary>","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/CoplayDev/unity-mcp/blob/c21bf496bca87d54e75bad048563c3adb1782081/MCPForUnity/Editor/Services/PathResolverService.cs#L140-L176","documentation":"Thrown by PathResolverService.SetClaudeCliPathOverride when the given path does not exist as a file. The Claude CLI executable override is stored in EditorPrefs only after confirming it exists on disk. An empty path clears the override and does not throw.","triggerScenarios":"User picked a Claude CLI path that is stale, a directory, or a typo; the Claude CLI was uninstalled/moved; a bare name passed instead of a full path.","commonSituations":"Claude CLI installed via npm in a relocated node folder; user typed 'claude' instead of the full path; uninstall after selection.","solutions":["Locate the real claude binary ('which claude' / 'where claude').","Pass the full absolute path to the executable.","If unsure, clear the override (empty) and rely on auto-detection."],"exampleFix":"// before\nresolver.SetClaudeCliPathOverride(typedPath); // throws if file missing\n\n// after\nif (!string.IsNullOrEmpty(typedPath) && File.Exists(typedPath))\n    resolver.SetClaudeCliPathOverride(typedPath);\nelse\n    resolver.ClearClaudeCliPathOverride();","handlingStrategy":"validation","validationCode":"if (string.IsNullOrEmpty(path)) { resolver.ClearClaudeCliPathOverride(); return; }\nif (!File.Exists(path)) return ErrorResponse($\"Claude CLI not found: {path}\");\nresolver.SetClaudeCliPathOverride(path);","typeGuard":"static bool IsExistingExecutable(string p) => !string.IsNullOrEmpty(p) && File.Exists(p);","tryCatchPattern":"try { resolver.SetClaudeCliPathOverride(path); }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"Claude CLI\"))\n{ /* locate the real claude binary; or clear override to use auto-detection */ }","preventionTips":["Pass the full absolute path to the claude binary.","Clear the override if uncertain and rely on auto-detection.","Re-detect after reinstalling/moving the Claude CLI."],"tags":["path-resolver","claude-cli","validation","config","filesystem"],"backgroundTag":null,"analyzedSha":"c21bf496bca87d54e75bad048563c3adb1782081","analyzedAt":"2026-08-13T17:36:56.095Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}