In a large saucepan, melt the stick of butter over very low heat. Add the brown sugar and cocoa powder and whisk until smooth. Slowly drizzle the egg and vanilla into the saucepan, whisking, until thickened, 2 minutes. Mix in the walnut mixture. Press the mixture into the prepared baking dish in an even layer and refrigerate the cookie base for 30 minutes.