Combine all of the ingredients in a medium saucepan and simmer over low heat until the garlic is tender but not browned, about 30 minutes. Let cool.
Using a slotted spoon, transfer the garlic, herbs, and chiles to three 1/2-pint canning jars. Pour the cooking oil on top, seal, and refrigerate for up to 4 months.