Prepare a baking sheet by lining it with parchment paper. Set aside for use after mixing.
In a medium-sized saucepan, combine the sugar, corn syrup, peanut butter, and butter (if including). Warm the mixture gently over low to medium heat, stirring continuously with a heat-resistant spatula, until it comes to a gentle boil.
Once the mixture reaches a boil, immediately remove the saucepan from the burner. Stir in the vanilla extract and salt, ensuring they are fully mixed into the hot mixture.
Add the cornflake cereal to the saucepan. Using a flexible spatula, fold the flakes into the mixture gently to avoid breaking them, stirring until every piece is evenly coated.
Coat a small cookie scoop lightly with non-stick spray. Use it to portion out mounds of the mixture onto the prepared baking tray. Flatten the tops slightly if you prefer a more uniform shape.
Let the formed cookies rest at room temperature for approximately 30 minutes, or until they are completely firm and set.