When invoking a command that respects xref-search-program via TRAMP, e.g. on a remote system that doesn't have (in my case ripgrep) installed, an error is signalled indicating that the search query couldn't be executed. I managed to temporarily circumvent the issue with this patch