Whisk together egg yolks and cornstarch in a medium heatproof bowl until fully combined; set aside.
Whisk together sugar, cocoa, and salt in a medium saucepan until evenly combined. Whisk milk into sugar mixture, and bring to a simmer over medium, stirring occasionally.
Remove pan from heat, and slowly pour milk mixture into egg yolk mixture, whisking constantly, until fully combined and bowl is warm to touch.
Return mixture to saucepan, and continue cooking over medium, whisking constantly, until mixture starts to thicken and begins to simmer, 3 to 4 minutes. Continue cooking on medium for 30 seconds to 1 minute after mixture first comes to a simmer.
Remove from heat, and whisk in butter and vanilla extract until fully combined. Strain pudding through a fine mesh sieve into a large heatproof bowl.
Press a layer of plastic wrap directly on surface of pudding. Refrigerate until thoroughly chilled and set, 1 to 1 ½ hours.
