Why caramel crystallize after adding butter? This weekend I tried making salted caramel following a recipe from Bon Appetit's Test Kitchen (The caramel part from https://www.bonappetit.com/recipe/salted-caramel-chocolate-tart).

I noticed a little foam during the caramel formation but it did not give me much trouble at the moment, but later, when I added the butter, everything has gone awfully bad.

I took it off the stove to add the butter but it started to gain a sandy texture and a light yellow color. I put it on the stove again and kept adding butter hoping to solve it but it did not help.

In the end, I resolved by using half a glass of water, that lowered the temperature and melted everything back to a smooth deep amber sauce. After adding the cream and trying to reduce it to remove the added water, it went ok.

What did I do wrong? What happened?

P.S. In the recipe it asks for cream of tartar but I did not have it so I did not use it, is it the cause? I've seen other recipes without it, so I thought it was ok.
Acids, such as cream of tartar, can interfere with the formation of crystals by inverting sugars. Without it, you need to be more careful/lucky... 

To quote Cooks Illustrated [It's for simple syrup but point still holds]:


  Simple syrup crystallizes when enough of the sugar molecules stick to one another that they become insoluble in the water... To find a more effective solution, we had to understand why these additives helped. The cream of tartar and lemon juice are both acids that are able to break down sugar molecules into glucose and fructose in a process called inversion. So not only were fewer sugar molecules available to cluster together in our doctored syrups but the newly present glucose and fructose were physically blocking the remaining sugar molecules from one another.