I have found that "sometimes" you can feel the tension coming on your hammer but that's not very often . Usually you are caught off-guard for sure. All you can do is make sure on your part that you are doing everything according to plan and by that I mean not raising it too far above pitch on the first pass. I put CLP oil (not always, only if I think the strings have been sitting untouched for over a year or so....judgement call) on the upper bearing points especially on the bass string to loosen any rust that may be forming (formed) there and I will generally back the hammer up a bit before going forward on the first pass to break the rust-bond if there is one. I also am careful with the last 3 or 4 wound strings found usually in octave 3 where the section changes. I have had some trouble with these strings breaking on me so I go lightly there.
So, you take all these precautions and more but still a string will break on you. Develop a method and trust it and then, as a last thought, if/when a string breaks know how to repair it or replace it. It's not the end of the world but it is maddening sometimes especially when you are tight time-wise.
Best of luck. Duane.