Kent described what was/is in our Agreement of Sale. Before signing our AOS for the sale of our townhouse, I had our realtor put in it that if we could not find a new house then we could rent back our townhouse at an agreed-upon price.
The theory was that we were concerned we might not be able to find a house to buy quickly enough. Turned out we found one so we didn't have to use the 'rent-back' option. The buyer of our townhouse wanted to move in as soon as possible, so she would have been pretty upset had we had to stay longer.