As a GM, I occasionally run into situations where the players want to do something very poorly thought-out. Honest mistakes, not intentional derailing. In these situations, I often feel the urge to warn them, or ask if they're really certain what they're doing. It just feels wrong for a situation to be ruined for the players just because a one of them forgot about something. A pronounced example:
GM: The gate is closed. Two guards stand before it. "I need to see your invitations", one says.
Player: Are they armed, do they look dangerous?
GM: They're armed and armored. Each has a halberd, a helmet and a breastplate with the comital emblem. They don't look very skilled or hardy, most likely they're peasants conscripted into guard duty.
Player: I can take two peasants, CHAAARG-
GM: Uh, you do realize you actually have an invitation, right? Are you certain you want to fight?
Player: Oh yeah. I produce my invitation and present it to the guard.
And a less pronounced one:
GM: The compound is ahead of you, surrounded by a wire fence. The barbed wire, as your informant let you know, has been temporarily removed for maintenance work. A lone security officer is patrolling the yard, looking bored.
Player: I wait for him to look the other way, and then jump the wire fence.
GM: Are you sure? In the last session you found out the fence has sensors all over, so you'd sound an alarm.
Player: Huh, right. I guess I'll start looking for a way to disable the alarm first…
Now, is this considered bad, undue meddling on the PC's behavior? If so, is there a better way I could handle this, rather than sanity checking player actions?