Position the racks in the upper and lower thirds of the oven and preheat the oven to 350ºF. Line the cookie sheets with parchment paper.

Put the butter and bittersweet chocolate in a medium heatproof bowl, preferably stainless steel, set in a wide skillet of barely simmer water, and stir frequently until the mixture is melted, smooth, and fairly hot to the touch.

Meanwhile, whisk the flour and baking soda together.

When the chocolate mixture is ready, remove the bowl from the water bath and stir in the sugar, salt, and vanilla. Add the eggs one at a time, stirring until incorporated. Add the flour mixture and stir vigorously with a wooden spoon or spatula until the batter is smooth and glossy and comes away from the sides of the bowl; it is critical that the batter pull itself together, so don’t stop mixing until it does. Make sure that the batter is completely cool, then stir in the nuts and chopped chocolate or chocolate chips.

Scoop slightly rounded tablespoons of the batter 2 inches apart onto the lined sheets. Bake for 10 to 12 minutes, or until the cookies are puffed and crackled on the surface but feel slightly soft when touched with a fingertip; rotate the sheets from top to bottom and front to back halfway through the baking time to ensure even baking. Set the pans on racks to cool completely or slide the pan liners onto racks. The cookies keep in an airtight container for 2 to 3 days.