Whisk the flour, cocoa, baking soda, and salt in a medium bowl until relatively free of cocoa lumps.
Put the butter, peanut butter, and sugars in a large bowl, and beat with an electric mixer on medium speed until lighter in color and fluffy, 1 to 2 minutes. Beat in the eggs and vanilla on low speed. Stir in the flour mixture with a spoon. Stir in the chips and nuts.
Position your oven racks in the upper and lower thirds of the oven. Heat the oven to 350ºF and line 2 large baking sheets with foil.
Roll the dough between your palms into 1½-inch balls and set them on the prepared sheets about 1 inch apart. Bake just until the cookie centers look dull instead of shiny, about 10 minutes. (Cookies will feel soft to the touch but do not bake further.) Cool for 5 minutes in the pan. Slide the foil off the baking sheet to transfer the entire batch of cookies to a cooling rack. Loosen them from the foil when they are firm enough to hold their shape. Then cool them completely on the rack.