Just ask your agent. He/she will guide you all the way!
If you are about to buy it yourself, here is the answer based on my knowledge:
1. If not yet offered: better put this condition/contingency in the offer if you want seller taking care of the permit issue : seller will pay for city report and clearance.
2. If escrow already opened: you can not do anything after the city report coming out.
Be advised: with un-permitted addition, it's up to city inspector to order either tear it down, obtain permit , or re-modify the addition to code to be permitted.
When escrow opened, either seller or buyer (depending on how offer written) should order the city inspection. When you have the report, just follow up with that requirement(s) in order to close your transaction.
If the report clear, it's great; however, if not, the cost to bring it to code/city requirement is depend on the offer. See item 1 above! If that written on the offer, seller pays, if not, either you pay or you still have a change to re-negotiate with seller.
If city order to tear it down, there is a pretty chance that you would ask seller to pay for the cost AND/OR lower the offer amount!
*** Some cities do not require to have city report such as: La Puente, South El Monte, Baldwin Park, Whittier, Pomona, ...You don't worry much about un-permitted additions in these cities.
James Bui - Realtor