Why did my caramel come out grainy?
I noticed that you're stirring constantly. Generally with candy you want to stir as little as possible, since it causes sugar crystals to form in the syrup. In addition to making the candy grainier, they reduce the overall lifespan- even after the candy has cooled the (larger) crystals will continue to grow, causing the candy to slowly revert back into flavoured sugar.

Once the sugar is fully dissolved, you want to disturb it as little as possible. You will still have to do some stirring, otherwise the milk solids will burn. It'll help a bit to mix in the corn syrup at the same time as the sugar. Corn syrup is an invert sugar, meaning it gets in the way of crystallization and slows it down. If your caramel is still coming out grainy, try adding half a teaspoon of lemon juice. Your candy will be slightly gummier, but the acid in the lemon will inhibit crystallization and reduce the graininess.