In a small pot or skillet make the roux (tangzhong): add the 30g flour and 120g of milk. Set over medium heat, whisk well, and cook until thickened - a few minutes. Remove from heat and set aside to cool.
In the bowl of a stand mixer, add the warm 120g of milk and the yeast. Whisk and set aside to bloom (after a few minutes it will turn foamy and bubbly).
Sift the cocoa into a small bowl and pour the boiling water over it, whisk well.
Into the bowl of the stand mixer, over the yeast, add the remaining flour, the sugars, salt, vanilla, eggs, cooled tangzhong, and chocolate mix. Affix the dough hook and begin kneading on medium speed until the dough starts to come together around the hook.
One tablespoon at a time, with the mixer working on low speed, add the butter, waiting about 10 seconds before adding another tablespoon. Leave the mixer to knead the dough for about 10 minutes, until it is gathering around the dough hook and starting to clear the bowl.
Oil a large bowl and transfer the chocolate dough into the bowl. Toss the dough around to coat it in oil. Cover with a tea towel or bowl cover and let rise for about half an hour at room temperature then transfer to the fridge to rise overnight. In the morning it should be doubled in size. Alternatively you can do the entire first rise at room temperature though the dough may be harder to work with (stickier).
When doubled, transfer the dough onto a floured surface. Oil two loaf pans in preparation for the bread.
Divide the dough into 16 pieces. Roll each piece into a ball then place them in the pan so you have eight (in two rows of four balls) balls of dough in each loaf pan.
Cover the pans with a tea towel then let rise until puffy; when you poke the dough it won’t immediately bounce back but will slowly move back into shape and leave a slight indentation.
Preheat the oven to 375 F. Mix an egg yolk with 1 tablespoon of heavy cream or milk. Brush this on top of the doughs. Bake the bread until an instant read thermometer reads 190 F, for about 35 minutes.
Chocolate brioche keeps well at room temperature, in an airtight container, for a few days.