Preheat the oven to 350°F. Line a 9 by 13 inch metal baking pan with parchment paper, leaving an overhang on two sides.
First, let's make the chocolate chip cookie batter. In a medium bowl, whisk the melted butter, brown sugar, and granulated sugar until combined. Add the egg, vanilla, and sourdough discard and whisk until smooth. Stir in the flour, baking soda, and salt until just combined. Fold in the chocolate chips and set aside.
Now, it's time to make the brownie batter. In a large bowl, whisk the melted butter and granulated sugar together. Add the eggs and vanilla and whisk vigorously for about 1 minute, until glossy and slightly lighter in color. Whisk in the sourdough discard.
Add the cocoa powder, flour, salt, and espresso powder and stir until just combined. Fold in the chocolate chips.
Spread the brownie batter evenly in the prepared pan.
Scoop the cookie dough into small balls and drop them evenly over the brownie batter. Gently flatten each one so the cookie dough covers most of the surface.
Bake for 35 to 45 minutes, until the cookie layer is golden brown and a toothpick inserted in the center comes out with moist crumbs. Tent with foil for the last 10 minutes if the top is browning too quickly.
Cool in the pan for at least 2 hours, then refrigerate for 30 minutes.
Lift the brookies out using the parchment overhang and cut into 24 squares.