Garlic and oil emulsion A few days back I was making garlic bread. I had pressed garlic into olive oil, added a little salt, and forgot about it for a good half hour or so. When I came back to it, I stirred it up a bit, and it seemed to thicken slightly. Intrigued, I whisked some more and it ended up extremely thick, with self-sustaining peaks. 

Tonight I tried to recreate this phenomenon, and it really didn't do anything to speak of. After whisking hard for about 45 minutes, I still basically had a bunch of pressed garlic sitting in a pool of olive oil.

What did I do wrong the second time, and what did I do right the first time?
Congratulations, you accidentally made allioli, a Catalan emulsified sauce requiring only garlic and olive oil to thicken and emulsify.  Unfortunately, it's harder to make and less stable than the other aiolis (garlic mayonnaises), which include egg yolks as emulsifiers.  This is probably why you are having difficulty replicating it.

To make it more consistently:


Smash the garlic up into a fine paste before adding oil
Add oil slowly, starting with a drop at a time, and mixing rapidly until incorporated (traditionally this is done with a mortar and pestle, but it is easier with a mini-whisk).
Optionally, cheat and add an egg yolk (beaten) for every clove or two of garlic (it is no longer a true allioli though).