Beat the butter and sugar in a mixing bowl using a hand mixer, till pale and creamy.
Sift in the flour, cocoa, baking soda and salt, if using. Fold with a silicone spatula to combine, the bring the dough together with your hands. It will start off a bit crumbly but will come together with the warmth of your hands.
Place the dough on a large piece of clingfilm, flatten into a disc and wrap it tightly. Chill for 30 minutes to 1 hour until firm, but not so hard that you can't roll it.
Preheat the oven to 160 C and lay a silicone baking mat on the kitchen counter. The mat will help you easily transfer the cookies to the oven.
Cut the chilled dough in half and place one half back in the fridge. Place the chilled dough on the mat, cover it with a large piece of clingfilm or baking paper and roll it out slowly to about 1/8 inch thickness. You don't want it paper thin, but not too thick either.
Using a 2-inch round cookie cutter, bottle cap or other tool, cut out cookies in the dough, spacing them about 1/2 inch apart, but don't separate them yet. Slide the mat onto a baking tray and place in the fridge for 20 minutes. This firms up the dough and then the easiest thing to do is use a sharp knife to cut away the scraps (re-roll them for more cookies), leaving the cookies as is on the mat, without the need to lift them and place them on a separate baking tray which could ruin the shape a little bit. I find this method easy and very convenient for warmer kitchens where the dough softens fast. But if you prefer to cut out the cookies on the kitchen counter and then transfer them to a lined baking tray that's fine too.
Do the same with the other half of the dough. In all, you should have enough cookies to make about 26 cookie sandwiches. I usually make one batch at a time, cutting out the rest while the first batch bakes and creating a sort of assembly line of dough, baking mat, baking tray!
Bake the cookies for 10 to 12 mins, or until fragrant, darkened and with small cracks on the tops. Let them cool for 10 minutes before transferring to a wire rack to cool completely before filling.
To make the filling, whisk the peanut butter, butter and sugar in a small bowl until smooth. Keep chilled until ready to use. It should be firm but spreadable.
Spread about 2 tsps of the filling on the base of half the cookies, then cover with the other half and press down lightly. Place in the fridge for 30 minutes, to help the filling stick better to the cookies and make them easier to eat. Then dig in! Cookies are best stored in the fridge at all times and they will keep for 8 to 10 days.