You need to review the purchase contract and the seller's transfer disclosure statement (and any supplements) regarding the property you purchased concerning all statement about the property having all required permits before you closed.These statements would be the basis for any possible legal action against the sellers, their real estate agent (listing) and your own (selling). It seems that your real estate agent jumped the gun in letting you close escrow on the home when there were issues concerning the permit status still in the air.You should consult with a good real estate attorney about the situation. A letter should be written to the seller and both sets of real estate agents putting them on notice of the permit status problem and your desire that they compensate you for the problem. You bought the home thinking its permit status was fine and it is not.