{"record":{"id":"c35af162f53bbc82","repo":"mvanhorn/last30days-skill","slug":"engine-subprocess-failed-to-start-w","errorCode":null,"errorMessage":"engine: subprocess failed to start: %w","messagePattern":"engine: subprocess failed to start: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp/internal/engine/run.go","lineNumber":113,"sourceCode":"\tres := &RunResult{\n\t\tStdout:   stdout.Bytes(),\n\t\tStderr:   stderr.Bytes(),\n\t\tExitCode: 0,\n\t\tTimedOut: errors.Is(subCtx.Err(), context.DeadlineExceeded),\n\t}\n\tif err == nil {\n\t\treturn res, nil\n\t}\n\n\tvar exitErr *exec.ExitError\n\tif errors.As(err, &exitErr) {\n\t\tres.ExitCode = exitErr.ExitCode()\n\t\tif res.TimedOut {\n\t\t\treturn res, fmt.Errorf(\"engine: subprocess exceeded %s timeout\", timeout)\n\t\t}\n\t\treturn res, fmt.Errorf(\"engine: subprocess exited with code %d\", res.ExitCode)\n\t}\n\treturn res, fmt.Errorf(\"engine: subprocess failed to start: %w\", err)\n}\n\n// resolvePython returns an absolute path to the interpreter or an error\n// naming the install URL. If the caller supplied a path we trust it - tests\n// rely on this to inject a stub. Otherwise we look up python3 on PATH.\nfunc resolvePython(override string) (string, error) {\n\tif override != \"\" {\n\t\treturn override, nil\n\t}\n\tpath, err := exec.LookPath(DefaultPythonBinary)\n\tif err == nil {\n\t\treturn path, nil\n\t}\n\treturn \"\", fmt.Errorf(\n\t\t\"engine: %s not found on PATH (need Python %s+, install from %s; current GOOS=%s)\",\n\t\tDefaultPythonBinary, MinPythonVersion, PythonInstallURL, runtime.GOOS,\n\t)\n}","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/mvanhorn/last30days-skill/blob/c7460f6114449ddfe6ea3fc2f23c3d910c0e740c/mcp/internal/engine/run.go#L95-L131","documentation":"Error \"engine: subprocess failed to start: %w\" thrown in mvanhorn/last30days-skill.","triggerScenarios":"Fires when the engine cannot start the last30days.py subprocess at all, usually because the Python interpreter is missing, the script path is wrong, or the OS denied process creation (resource limits).","commonSituations":"See trigger scenarios.","solutions":["Verify the Python interpreter path exists and is executable (resolvePython found it earlier, but it may have been removed mid-run).","Check system resources (fork/exec limits, memory) if exec fails intermittently.","Ensure the cache script path contains no characters rejected by exec on this OS."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c7460f6114449ddfe6ea3fc2f23c3d910c0e740c","analyzedAt":"2026-08-15T03:34:49.540Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}