In a medium saucepan, combine butter, sugar, cocoa powder, and milk. Bring to a boil over medium heat, stirring constantly.
Boil for 1–2 minutes, then remove from heat.
Stir in peanut butter and vanilla extract until smooth and well combined.
Fold in rolled oats (and optional nuts or coconut) until evenly coated.
Drop spoonfuls of the mixture onto a parchment-lined tray.
Let cookies set at room temperature for 30–60 minutes, or refrigerate for faster setting.
Once firm, serve and enjoy!