When I GM, if a player is absent, I will give my copy of his character to another player to play. However, the actual playing of the character is more of a joint effort, meaning that I reserve the right, as GM, to veto any action the temp player may have the character perform. If the character would not (from my own experience with the player/character) act in a certain way, then the temp player is not allowed to make the character act that way.
I also will not kill, rob, or otherwise do something nasty to a character whose player is not there unless it is done equally to the WHOLE party. However, I have no compunctions against hurting the character. Nice nasty wounds are par for the course.
Since I use a system with very nasty criticals, it is quite easy for me to adjust a death crit to something like coma for 3 days.
In regards to the situation as described...
1) The trogs climbed a wall and in through windows while carrying large 2 handed weapons? And done it quickly enough that the did not have time to warn the other players? So they could either climb very fast one-handed, or they had to draw their weapons AFTER climbing in the window. Either way, the character should have had plenty of time to retreat more than just 5'. If I had been GMing, I would have point blank asked the player if he was going to retreat further or not (when I question a player's action, that means I think their action is a bad idea and am giving them the chance to correct it).
2) A simple "I think Bob would have his character retreat further and switch weapons at this point" could have possibly salvaged the situation. The missing player IS one of your players. If the character's actions were not in line with what the missing player would have done, you should have questioned the actions of the temp player.
The way I see it, as GM, you have the responsibility to make sure that any temp player plays the character of a missing player as closely as possible to how normal player would have. A bow against a great axe, in melee range (and a single 5' step IS withing melee range) does not sound like something that a normal character would attempt, especially not one where the player has asked you how close to levelling up he is.
3) I view killing (or doing anything permanently nasty to) a character whose player is not there as railroading. In short, the player had no options. Yes, he missed the session. From your comments, he was not happy about having to miss, and was worried about his character. He contacted you before the session in regards to it. From the comments you made, I infer that his missing the session was not something he wantd to do. Yet, the player to whom the character belonged had no options. He asked that nothing really bad happen to his character. This gave you, the GM, permission to make sure that the character did not do something that was going to kill him. Sorry, but you failed him in this. Big time.
First, YOU sent the trogs with the great axes through the window after the character. Second, from your description, the character only had about 30-40 HPs, and you still sent a trog with a great axe (high damage average) after him. Instead of making it a killing attack, you could have made it a subdual attack. The trogs could have decided to use him for some nasty ritual, and thus decided to knock him out instead of killing him outright.
Also, you were given an excellent suggestion up above. Have the character wake up, undamaged, and turn the "why" of it into a plot point. Have him search out and discover why this happened. Perhaps the trogs did a ritual on his corpse, and implanted the mind of one of their own, buried deep, as a sleeper agent against hte surface world (and have him start doing nasty things while he thinks he is asleep - the trog having taken over his body while his mind sleeps).
Perhaps he awakes with a strange amulet that he cannot remove. And once they get back to town, he starts getting followed by members of a strange cult who want to use him in a ritual to bring forth their "dead" god. They had performed a ritual previously whose culmination co-incided with the moment of his death, so he was randomly picked.
There are numerous ways to void this death without retconning anything that has already happened. The best way is always to turn it into a mystery for the players to solve. This is ALWAYS a good thing as the players become MORE involved and feel that their characters are more a part of the game world.
Overall, I would say that you did make a few mistakes here, but they are correctible without "undoing" anything that happened in the previous session...
