Problem defending Tihr
Solution 1:
The main problem is commanding your soldiers to "Hold This Position" makes them spread out in a line more suitable for open confrontations. Due to the defensive nature of sieges your army may become confused and descend the ladder into enemy hordes.
You'll need them to congregate somewhere, but when defending a city that's easier said than done. I've found that actually not commanding them to do anything means that most soldiers will hold their positions near the ladder and fewer will charge down it. It's inevitable, but having four or five men descend the ladder is preferable to having ten or more descend, despite being commanded to hold the line.
Alternatively, ordering all soldiers to stand their ground, or "Follow Me" means that they'll mostly maintain their original positions near the top of the ladder. be wary when commanding "stand your ground" as new ally reinforcements may stay at their spawn points inside the city rather than fight atop the city walls.
What I've found to be most effective is having commanding them to "Hold This Position" about five paces to the side of the ladder and positioning myself on the opposite side of the ladder. Most enemies will charge the mass of allies and leave their undefended backs to your character, who is undoubtedly much more powerful and in an optimal position to attack.
If all else fails, it's possible to ignore the city and flee into the wilderness. About a day after the city is conquered most of the attacking force will have dispersed and will have left a skeleton crew - usually about a third of the attacking force - to defend their new city. At this point you can go on the offensive. You may find it easier to attack a 300 man garrison than defend against a 1,000 man siege. Additionally, waiting a day or two gives you extra time to call up vassals to help attack or gather other important supplies.