Preheat oven to 400. Using a mandolin or a sharp knife, peel and slice onions. Add to a pot with 2 tbsp of the butter and a large pinch of salt and pepper. Cook for about 30 min, stirring often. Add in chopped thyme and continue to cook for another 20 min or until the onions are deep golden brown and very jammy.
Using a mandolin or sharp knife, peel and thinly slice potatoes. Use 2 tbsp of the butter and coat the inside of your cocottes. Add a little salt and pepper.
Add a layer of thinly sliced potatoes in an almost cascade style effect until they completely cover the bottom of the cocotte. Add a sprinkle of salt and pepper. Add an even layer of caramelized onions. Repeat this step until you get to the top of your cocotte.
Pour chicken stock over top, just until it gets to the edge of the top layer of potatoes.
Dot with the last 2 tbsp of butter and season with salt and pepper. Bake for about 50 minutes. Let cool and top with chopped chives. Enjoy!