Make the cookie dough: With a stand mixer fitted with a paddle attachment or with a hand mixer in a large bowl, beat the butter with the brown and granulated sugars, kosher salt, and vanilla until soft and creamy.
Sift the flour, cocoa and baking soda right into the butter mixture. On low speed, carefully mix the flour mixture into the butter mixture just until the flour disappears into the dough, scraping it down as needed.
Add the chocolate pieces and mix only to incorporate.
Shape the cookie dough: Turn the dough out onto a large piece of parchment paper and shape it into a log about 2 inches in diameter and 15-16 inches long. Roll the log in the parchment paper and chill for 3 hours, until firm.
Bake the cookies: Heat your oven to 325°F (160°C). Line two large baking sheets with parchment paper.
Slice the logs into rounds that are ½-inch thick. Arrange the rounds on the baking sheets, leaving about one inch between them. Sprinkle each cookie with a flake or two of sea salt.
Bake cookies for about 12 minutes. They will be very soft and look completely underbaked. Transfer the baking sheet to a cooling rack and let the cookies rest until they are only just warm.