When I was mucking around trying to pre-requisite pacts for my mod I had this happen and assumed it was something I did, perhaps it wasn't. Anyhow I fixed this issue simply by adjusting a couple of values in the Gameplay CONSTANTS file. It seems as though some of the values are backwards.
Under "playerDiplomacyAIDef" you have 2 threshold values for each pact.
offerOrAcceptTreatyHappinessThreshold: type of pact value &
breakTreatyHappinessThreshold: type of pact value
Most of the "offerOrAcceptTreatyHappinessThreshold" values are set to 0. Yet most of the break treaty thresh hold values are 9.5. So once your pact is formed as soon as your relationship value drops below 9.5 the AI will end the pact but if you still have that value higher than 0 it will want to form that pact again and gets stuck in a loop of breaking then wanting to reform. If you swap the values for the pacts where the break threshold is higher this will fix this problem.
Perhaps another file for your bad files list there myfist0.