To me, if the possible consequences range from an agent might try and poison you in a park through a van will pull up and discharge a dozen agents trying to kidnap you to a coup will occur in your homeland, and a battalion of soldiers come after you, then I don't really know what the consequences are.
I think that the range of consequences would be likely understood by the players and would keep to within a reasonable limitation based on the scale of taken actions, unless the game or GM are particularly punishing. And the players would likely know
that unless they're going into the game blind or have never played under that GM before.
If you're trying to hack into the Enemy's computers, it makes sense that if you roll badly (or they roll well), they will find you and send someone after you. It's also reasonable to assume (again, assuming that neither the game nor GM are out to get you) that you'll at least have a
chance to defeat, evade, or redirect the goons--whatever is most appropriate for your characters.
However, the consequences don't have to be 100% on the GM's shoulders, regardless of the game. The GM
can say to the players "You're pretty sure that they've pinpointed your location" and either ask them outright what they think the Enemy is going to do or listen to the PCs' conjectures and use that as a guide for what the consequences should be.
For example, in the D&D game I've mentioned, my character and another (the group's cleric) were looking for a Clue in a ruined hovel that was amongst several other practically ruined hovels in the slummiest of the town's slums. I was actually pretty angry (in character) because previously we'd been dealing with nobility and the contrast was upsetting. We found a locked box. I'm playing a rogue. This was ages ago (the game's been played on and off for multiple years now), so I can't remember if I neglected to check for traps on the box entirely before I picked the lock, or if I checked for traps and "didn't find any," but yeah, whichever one it is, I
do remember that I rolled a 1. With no Int bonus or skill in Investigation. So of
course there was an explosive trap that I only barely survived (thank goodness for fire resistance!) that pretty much leveled the hovel.
Rag-clad, poverty-stricken peasants came a-runnin', scared, angry, and wanting to find out what happened. I decided that while my rogue had no Int modifier to help her search for traps, she
did have a pretty high Charisma and expertise in Persuasion, so I claimed that that it was the fault of the wizards in the tower that was
right there. Clearly they were experimenting and didn't care that their experiments were hurting the people of this part of town (we had had some reasons to suspect that the wizards were doing something a bit fishy anyway, so I had no problem pinning the blame on them). DM wanted me to role Persuasion.
Nat 20.
DM wanted to know what result I was looking for. I wanted for these poor people to be really angry at the rich wizards who were living in luxury and doing suspicious things.
Cue the start of a riot that spread across the entire city. (Note that a single nat 20 didn't cause the entire riot--I did help to fan the flames a bit with some more Persuasion/Deception rolls.) The DM thought this was awesome, although IIRC the cleric was pissed and pulled me along back to our inn by my ear. (Or maybe that was another time my character did shenanigans. She's a shenaniganner.)