Preheat oven to 350 degrees. Put butter and sugars in the bowl of an electric mixer fitted with the paddle attachment; mix on medium speed until smooth, about 2 minutes. Mix in eggs, 1 at a time. Stir in vanilla.
Sift flour, cocoa powder, baking soda, baking powder, and salt into a medium bowl. Mix into butter mixture on low speed until well combined. Stir in chocolate, coconut, and walnuts.
Using a 1 1/2-inch ice cream scoop, drop batter onto baking sheets lined with parchment paper, spacing 2 inches apart. Flatten slightly. Bake until set, 10 to 12 minutes. Let cool on sheets on wire racks 2 minutes. Transfer cookies on parchment to racks to cool completely. Cookies can be stored in airtight containers at room temperature up to 1 week.