Reduce the heat to low, but high enough to maintain a gentle simmer. Swirl or stir the pot occasionally, until garlic and shallots are golden brown and crisp, 20–25 minutes. (Take your time—you want to drive all the moisture out before they brown.) Keep your eye on everything. You want everything to cook, but not scorch, so keep everything moving, not settling on the bottom. Right towards the end you will find that everything will start crisping up, so don't leave the pot.
In the meantime, mix red pepper flakes, tamari, sesame seeds, and sugar in a medium bowl.
Strain shallot mixture through a fine-mesh sieve set over red pepper flake mixture. If the bottom of the sieve touches the oil, lift it off and place it over a different bowl.
Transfer the completely cooled garlic, shallots, peanuts etc from the sieve to the bowl with the oil mixture. You can remove the star anise and cinnamon sticks, but I leave them in to continue to impart their flavour and aroma. Stir well. Place everything into a glass jar with a lid.
Do Ahead: Crisp can be made and stored in the back of the fridge for a few months easy.
See blog post for more details