I accidentally added butter into flour/cocoa powder/baking soda without beating first
Think shortbread / pie dough:

If you have a food processor, dump the butter &amp; dry ingredients in, pulse until you have a coarse crumble. Add some liquid - either your egg (beaten!) or, even simpler, just as much milk as needed to help the dough to stick together. I personally would use milk instead of egg for lighter cookies. Eggs might make them too dense. Chill for half an hour or so, then roll and cut or shape otherwise.

If you don't have a food processor, a pastry cutter or two knives works just as well. Or rub the butter into the flour mix.

You might not end up with your planned cookies, but the result should be nice enough to eat. No need to discard the ingredients.

And remember:
Sometimes the best recipes started as accidents!