I usually just give them a raised eyebrow when they announce that they are doing something stupid. If they don't catch that, then the game proceeds apace. Sometimes, they luck out and come out smelling like roses, and they think it's all because they did something smart.
Most times, though, they suffer the consequences. For example, in the last campaign, the group is investigating some disappearances in a small town. One character out and out accuses the local cleric of the crime (he was right, and I don't know how he figured it out so quickly, but I didn't tell them right away). So, that night, the thief goes out on his own. And gets captured. The party receives a ransom note and goes to spring him. They get ambushed and the mage gets knocked out. They retreat. They leave the mage UNGUARDED at the inn and go spying. The mage gets kidnapped as well. There were several times I raised my eyebrows during that whole session, but not once did they stop and think about their actions. Luckily, they were able to rescue the party members, but had to replace all their lost gear and savings. And the bad guy got away and became the BBEG of the campaign. And, he escaped because they did something stupid again.
They did eventually learn. But it took about four more sessions full of silliness and near death experiences before they did learn. And I never spared their lives. They managed to save themselves with good die rolls or RP.