Chili oil becomes cloudy in the fridge because the saturated fats and some of the chili compounds solidify at lower temperatures. This is a normal and reversible process that doesn't affect the oil's quality or safety.
Chili oil is typically made by infusing oil with chili peppers and other spices. The oil used is often a vegetable oil, which contains a mix of saturated and unsaturated fats. When chili oil is refrigerated, the saturated fats, which have a higher melting point, begin to solidify. This solidification causes the oil to appear cloudy. Additionally, some of the compounds extracted from the chili peppers themselves can also precipitate out of the oil at lower temperatures, contributing to the cloudiness. This is similar to what happens with olive oil when it's chilled. Once the oil returns to room temperature, the solidified fats will melt again, and the oil will regain its clear appearance. The cloudiness is purely a physical change and doesn't indicate spoilage or degradation of the oil's flavor.
To minimize clouding, use an oil with a higher percentage of unsaturated fats, such as canola or sunflower oil, when making your chili oil. These oils are less prone to solidifying at refrigerator temperatures.