Hmm...
Can't seem to just click on "Post Reply," I actually have to click on the "Reply" icon to someone's message...peculiar...
Anyway, I believe in a certain degree of "plot immunity." Otherwise, the game just turns into a hack'n'slash fest where, ultimately, investing time and care into your character doesn't matter because it could ultimately die during any random encounter. That, or you have to allow for fairly accessible sources for raising the dead - and personally, I want death to mean something. I don't want hack'n'slash fests where ultimately the character doesn't matter, and I don't want the miracle of resurrection being reduced to something more akin to picking up a prescription at the convenience store. As such, I believe in a certain degree of plot immunity, so that the players can actually invest some thought into their character, above and beyond just being a collection of stats, and that I don't need to turn the magic, splendor, and awe of a fantasy game into a trip to the mall or doctors.
However, by completely making the characters immune to death, you take away a certain degree of the suspension of disbelief, and, to another degree, that the characters choices actually matter.
As such, I will fudge rolls during random encounters that I don't believe should result in a characters death. If I'm just whipping something out to, say, represent the fact that the characters are traversing dangerous terrain, or they're in a dangerous part of the city, or whatever, and it's essentially a random encounter, I will avoid killing the characters off. Because, as I said, I want them to care about their characters, but also want death to matter, and resurrection seem like something special.
However, I will plan out "random" encounters which are in no way plot related, except for the fact that I fully intend on holding nothing back, and a character may very well die. I don't inform the players of this, I don't make the encounter seem any different from one where I likely won't kill them - even when I'm fudging rolls, I don't fudge expected tactics that the monster would use, I simply say to myself ahead of time, "Someone might die here, and I'm not going to hold back." So the players know that their characters are the heroes, and can expect a certain degree of plot immunity, but that death can still come, in a most ignominious and random way. Out of any three encounters, they might know I'm fudging rolls and being soft on them with two of them, while the third had a honest attempt to take their lives involved in it, but they won't know which one. So they don't take needless risks, most of the time, and treat each encounter like it very well might be their characters last. At least, hopefully.
Because if they don't, plot immunity will not protect them from being stupid. Some time back, the party in my game was exploring a temple to one of the titans of the wind, and were running across a number of air elementals and the like due to that. At one point, they came to a corridor guarded by an Aerial Servant, which none of them noticed. Now, they were only 6th level at the time, so the Aerial Servant was a good 4 above their Challenge Rating, more so as one of the four party members had died earlier that session, so it was down to three PC's, and a 5th level NPC whose equipment was little better than a starting characters. So somebody likely wasn't walking out alive, and, near as I could guess, it would quite possibly be a total party kill if they fought it. No problem, says I, I'll just make it clear that this thing isn't something to be trifled with, and, seeing as how it's guarding the corridor, they can leave the way they came, and it won't follow.
So they approach. Right off the bat, they not having noticed the Aerial Servant, it attacks, and scores a critical hit on the Constitution 10 Rogue. I didn't even need to look at his hitpoints to know that the critical hit would kill him. So, this not being an encounter I intended to kill a character during, I ignored the critical, and rolled normal damage, which dropped the Rogue to exactly 1 hitpoint (not intentional, just the way it worked out). I figure, hey, good enough, now the characters should vamoose. I made it quite clear that it only struck the Rogue once, and almost killed him.
So what did they do? They decided to stay.
To further bring home the point, the NPC, noting that the characters were going to stay and fight, engaged the creature in melee combat. With a full attack sequence now, the Aerial Servant killed the NPC in one round. Now, it's vaguely worth noting, any NPC I run without a name and background, probably maxes out at 5th level. High level characters are heroes, or villains, after all, and not commonly met. My players know this. Now, even if the NPC hadn't been a named NPC (of the variety that I didn't just drum up on the spot), or had a background, they still should have realized he was quite possibly only one level behind them. I mention this because, after the entire encounter, they figured he crumpled so easily due to being low level, due to my general policy on NPC's. A reasonable assumption - if they weren't just themselves rising above the levels most NPC's had.
Due to this error in their judgment, after the NPC died, in one round of combat, after it almost killed the Rogue, they still stayed. Only after a PC actually died did the survivor fall back (the Rogue, wisely, already having done so).
So, again, I use plot immunity, but I generally plan out a random encounter ahead of time, say, every three or so sessions, that I will absolutely hold nothing back on, and then, if the players do something blatantly idiotic, where I've given them fair warning (more than fair warning in some cases) that the course of action isn't a bright one, then they've no protection, whatsoever, from whatever might befall them.
Plot immunity does have its place; it means the characters are important, and not just one amongst a succession of characters to be paraded out when the previous one dies, and gets around the local temple being denigrated to a convenience store. However, if taken too far, it takes the bite out of the game, makes the risks seem superficial, and acts of stupidity more tolerable, neither of which are acceptible. I use plot immunity perhaps half, or two-thirds of the time, and even then, try holding back just enough that they still hover on the brink of death (I may not try to kill them, but if I can sink someone into the low negatives, I'm doing all right by my perspective). I also reasonably attempt to target a character with something they will survive, but in such a way that it seems the entirely sensible thing for the NPC to do. I had a ratman, for example, recently attempt a Coup Des Gras on a dwarven Ranger/Fighter PC, while he was sleeping, but the other characters were awake for - the dwarf had about a 75% chance or so of success on the saving throw, which is in part why I did it, but it was also in such a way to scare the crap out of my players, because they knew failure meant death, and that the ratmen they were fighting weren't screwing around. Sure, the character could have died during the fight, and if he had, I had no intention of getting him out of it, but I intentionally targeted him off the basis that he would reasonably survive. Plot immunity, to a degree, but not in such a way that the characters feel they cannot die.
Notably, it also helps to give NPC's and monsters goals other than "kill the PC's." If something's looking for a meal, for example, it might just drop somebody into the negatives, then, as opposed to turning to chomp on the next character, or finishing the initial one off, it might just take its initial target while it's bleeding to death, and try to escape with it. I don't do mental gymnastics trying to figure out goals other than killing the PC's, but I do give it some thought, at least.