how does refinance affect lien priorities?

if original senior lien is refinanced, does the new beneficiary need a subordinate agreement to stay at senior priority?

Liens are given priority based on the filing date. (First in time is first in line). If you refi a 1st the second mortgage would need to sign a subordination agreement (it would also need to be recorded) acknowledging that the new loan is superior to their loan even though it was recorded after the 2nd. The 2nd lien holder would have to agree to the subordination to prevent the homeowner from increasing the loan amount on the new 1st and put the existing 2nd in a weaker position.
I like to refer to the subordination agreement as the “cutsy agreement”. The 2nd gives the new loan cuts in line.

Michelle is right that the new lender would need a subordination agreement to “stay at senior priority” to other junior liens - which you implied there were by saying the refi’d loan was “senior”.

But I think your question is whether or not the new beneficiary needs a subordination agreement from the paid off senior loan… the answer to that is NO. Instead the paid off loan will have a “reconveyance” recorded to show that it is no longer outstanding.

thanks, sean and michelle. when I check county records, usually there are 2 cases regarding lender’s change. one is refinancing. if all previous loans are paid off, there will be new loan records and reconveyance records for paid off loans. if any previous junior loan was not paid off, there should be a subordination agreement. the other one is “assign of deed of trust”, does that mean the previous lender sold the mortgage to another lender? for this case, if the assigned loan was a senior one, no subordination agreement is needed for the successor to stay at senior priority, am I right?

Yes, that’s right