There's also a Stephen Baxter novel, where a splinter group of humanity called "Wigner's Friends", believes something like this to be the case. I forget which one it is, but it's part of the Xeelee Sequence.
Roko's basilisk isn't retrocausal, maybe you're thinking of some Nick Land thing? But even there it's hard to tell how literal he is being with the Terminator analogies (if you haven't seen the movie it has time travel in it), the sanewashed version of his thesis revolves around thermodynamics, chaos theory, and strange attractors.
For a detailed discussion of retrocausality in Nick Land's work, check out the https://retrochronic.com/ introduction. There's even a dedicated Terminator section.
Nick Land interprets Roko's Basilisk as "retrochronic AI infiltration".
Yes, well. At this point I'm mostly convinced by multiple high quality arguments that Roko's Basilisk is non-functional against any reasonable theory of rationality.