In my current game I recently encountered the Paulos, one of my SurveyorShips ran into their HW. Usually, one needs to end the turn until the greeting-message from them is displayed, and one can then go into the Foreign-Policy-screen and contact them by clicking on their icon.
However, it is also possible to contact them the turn earlier, by selecting their planet, and clicking "speak to". In this case, I've taken their TechTreaty (and also 'Deflectors') in exchange to my 'Expert Miniaturization'-tech, but after the deal, relation was changed into 'War' immediately, that is, the other (Econ)-treaty was awway, instead was 'Peace Treaty' available. Made a reload, still, same issue.
The strange thing is that when I keep up the war-relation, I'm still getting research from their treaty, so it seems like those two things aren't mutual exclusive. 