Butter an 8x8 inch or 9x9 inch baking dish. Preheat oven to 350° F.
Place butter and chopped chocolate in a metal bowl. Set bowl over a pot with an inch or two of water and bring it to a low simmer. Melt chocolate mixture slowly, stirring often. Once butter and chocolate are fully melted, remove from heat.
Whisk in sugars, whisking vigorously until well combined and shiny, about 3 minutes. Whisk in sourdough discard.
Add eggs, egg yolk, and vanilla and coffee extracts; whisk well to combine.
In a medium bowl, whisk together flour, cocoa powder, and salt. Add flour mixture to chocolate mixture and fold together gently with a spatula.
Fold in about 1/2 cup of the chocolate chips. Pour batter into prepared pan and sprinkle with remaining chocolate chips.
Bake until toothpick inserted in center comes out clean, about 30-40 minutes (time will vary based on material and size of baking pan). Top with flaky sea salt, if desired.
Allow to cool completely before slicing and eating.