the fighters guild kills the thief's guild people, and the mages guild kills the telvanni councilors
Both of them work together well except for those two you mention, but they are optional and that too right at the end. So no problem. Also you have the choice of killing both of them who give orders.
But you should know that by doing code book quest first for Fighters guild doesnt allow you to join Thieves guild afterwards.Just join Thieves guild before that.
In my last playthrough, I joined both Mages guild and Telvanni and became Archmage and Archmargister with no problem.
PS: May be the only quirk of joining Mages guild and Telvanni is probably while RPing.