system
Given the following post, respond as if you're commenting on Reddit:
human
[Warhammer 40k] Has any faction actually ever made a pact or at least negotiated with other factions?

It seems like in the 40k universe everybody unconditionally hates all other factions, which is kind of dumb since the only factions with a chance of coming out on top seem to be Nids, Necrons, Orks and Chaos.
gpt
Every once in a while short-term deals happen, typically between the Imperium and one of the more rational or easily manipulated xenos. For example, in Dawn of War 2, an inquisitor convinces an ork freebooter and his crew to hunt down a rogue chapter master in exchange for a chance at fighting a big mob of guardsmen. Space marines have been known to call ceasefires when a greater evil arrives, typically Necrons, Nids, or chaos.

Long term alliances are pretty much impossible however. Any two factions you can name have too much beef to join forces even if it's ultimately the smart thing to do. The possible exception is the Tau, who have made their own alliances with the Kroot, Vespids, and some other non-Tau species. They are pretty much the perfect example: a chaos-resistant, level headed, technologically advanced empire actively extending offers of friendship and yet still every major faction wants them dead.