@Zaku has got the general practice rule basically correct. But outside of Federal cases, court rules for individual states control exactly what presumptions regarding testimony apply – and they can vary significantly.
Having sat at counsel table in both criminal and civil cases where the “hostile witness” question has come up, I can tell you that most judges in fact hate being asked to make the determination – and can take an unfavorable view of attorneys who use it as a tactic.
And the reason is simple : The whole purpose of court rules and procedure is to give both sides equal opportunity to discover facts and understand witnesses so they can make their best case. And in most all circumstances good attorneys are expected to do that work before trial. In front of a jury the process of examination, cross examination, and redirect are intended to give jurors the best opportunity to evaluate witnesses and facts – not keep the lawyers happy.
One of the most brutal rejections of hostile witness permission I ever heard came from a highly regarded superior court judge in a criminal case involving drug charges. He dismissed the jury and then spoke to the prosecutor (not my side) on the record :
“Mr ____ come up here. You’ve been a senior prosecutor in this county for 11 years. This isn’t your first criminal case, or your first time in my court. We know each other. And you know what I expect from both the defense and prosecution when cases like this come before a jury.
“Up to now I’ve granted two motions from your office to delay this trial so you could gather more evidence to respond to pre trial arguments by the defense. I’ve also sustained several objections you made to parts of defense witness testimony. Now you put your own star witness on the stand, and you’re shocked to find that his testimony doesn’t support the charges you’ve made. You want me to tell the jury he’s hostile, and to allow you to badger and berate him – because you don’t like what you’re hearing.
“I’m not going to do that. There’s no factual basis here for me to determine that his testimony under oath is untruthful, or prejudicial. You don’t get to use this tactic to avoid the damage you’ve done to your own case by not investigating the charges thoroughly or even just being ready for godsake. Now go sit down. I’m going to call the jury back in. And if you and the defense continue to question this witness you should expect they’re going make their decision based on everything they hear, not instruction I give them on your behalf.”
Books and tv make it all look so smart and exciting. But the reality is whenever you try shit like this, you better be ready for it to backfire.