Preheat oven to 350ºF. In a large bowl, whisk together flour, cocoa powder, baking powder, baking soda, and salt. Set aside.
Beat butter and sugar in a standing mixer until light and fluffy, about 2 minutes, pausing occasionally to scrape down sides and bottom of bowl with a rubber spatula. Beat in eggs, one at a time, for about 30 seconds each, pausing to scrape down sides.
With mixer speed on low, beat in milk, sour cream, and vanilla extract, followed by the flour mixture.
Drop by level tablespoonfuls onto parchment-lined baking sheets. Bake 4 minutes, remove from the oven and sprinkle each with a bit of crushed candy cane, then bake 2 minutes more. Cookies are done when set but still a bit shiny (if you press the centre, it will leave an indent). They will look underdone - this is essential to chewy, delicious cakes.