Just to provide my two cents: happened to me today, with spies that were just in the intel mission for two different civs. I missed to check if it was a change just between these two civs relationship, though.
This just happened to me this weekend. Fortunately, I had just saved, and using some auto-saves I went back to try to figure out what happened. Here are the highlights:
* I had ~ 6 active spies. One was counter-spying, one was in transit to Country A, three were in Country A (with whom I'm at war) and one was in Country B (denounced me).
* It seems the "magic" event was when Countries A & B formed an alliance. I got the message that my spy in the capital of Country A fled because a new empire was in power. That said, ALL of my spies in Country A and my spy in Country B were back in my capital when it was my turn.
* I went back a few turns and replayed it, but took my spy out of the capital of Country A before the alliance occurred -- but when the alliance was formed, all of my spies in Countries A & B fled (the "alert" only mentioned one again, but all fled) went back to my capital.
* So, it seems the alliance between A & B triggered this event, but I'm really not sure why it would. Again, I'm at war with one and was denounced by the other. (No history of either war or friendship with Country B.)
I have not played forward from this. Kinda sucks, especially since I've got Owls and Intelligence Agency.
If anyone can explain why this is happening (other than that it is a bug), please let me know!
Oh, and BTW, I started this game before the October update, but as soon as the update came out, its rules took effect. (I can't spy on my allies; no option to send them to allied cities.)
And in the FWIW category: This is deity, random small map, quick speed, random civs. (I'm Trajan. Country A is Hungary and B is Kongo.)
I suppose I'm lucky that in 7 months this is the first real bug I've come across.
Civ on!