It seems best to turn it around completely: let's start ghcid ONLY as a service. Don't worry about the output being written to some file. Let the Erlang side query tests. EDIT: Something works, but still there are things I don't understand about restarting. Maybe it is useful to spend the time to get the ghcide code up?