いままでは、どちらかがきげんの悪い時は、どちらかがなだめ、うまくいって来たのだが、どうしたことか、議論になってしまった。
Until now, when either of them was in a bad mood the other would calm them and skillfully go and come back, but somehow they ended up getting into an argument.
I have no idea how to translate いって来た in this sentence. I'm assuming it doesn't literally mean "go and come back".
Also, have I correctly translated どうしたことか as "somehow", i.e. not the expected result?