1. The agreement is not invalid. However the buyer since has bought a suit property he will be bound by the outcome of the suit pending between you two.
2.If you have read section 52 then read it carefully that i prohibits sale during pendency of suit but does not make it illegal..
3. If you want to compromise then make it asap/ If settlement happens then the seller may cancel the agreement.