Preheat oven to 350°F. Line cookie sheets with parchment paper or silicone baking mats.
Whisk flour, salt, baking soda, and cocoa powder in a medium sized bowl. Set aside.
Cream butter and both sugars in the bowl of an electric mixer fitted with the paddle attachment, or you can use a hand mixer. Mix until smooth, scraping the sides of the bowl as needed, until smooth. Mix in egg and vanilla, then slowly mix in dry ingredients. Mix until smooth. Dough is sticky.
Scoop 1- or 2-tablespoon size balls of cookie dough onto prepared cookie sheets. Bake cookies for (small) 8-11 minutes or (large) 12-15 minutes, or just until they are no longer glossy. Cool before removing from cookie sheets.
Make the filling: beat butter, salt, and peanut butter with a hand mixer in a large bowl until smooth, about a minute. Slowly mix in powdered sugar until the mixture is smooth and thick, then add vanilla and 1 tablespoon of heavy whipping cream. Beat for 30 seconds, then add more cream as needed for consistency, up to 1 more tablespoon. You want it smooth and spreadable, but not runny. (I used 2 tablespoons.)
Pipe the filling onto half the cookies and sandwich with a second cookie. Store in an airtight container for up to 3 days or freeze for up to one month.