On the other hand, it is the buyers responsibility to go and check whether permits have been pulled or not on the property they are buying. It is part of the buyer's investigation. (A smart listing agent will do this just to prevent this type of problem, and also recommend to the buyer to do the same, in writing, but it isn't necessarily their job to.) In California, buyers are given 17 days to do this unless it is negotiated differently. You also, normally have 5 days to do any investigating on any new disclosures given, even after this 17 day period. Was this new disclosure in writing?
If you feel this lowers the value of the home , the time to renegotiate is now, but it doesn't guarantee they will lower the price.
Should the listing agent be held liable? For what, disclosing the truth that was available publicly and is part of a normal buyer investigation?
I know this might sound harsh, but buyers need to investigate and take their 17 days seriously. A good buyer's agent will explain this to you prior to your home search. Most buyers do not know that looking up permits is part of their job.
You can certainly try to renegotiate. Talk to your agent about what's standard in your area. It's very typical for properties in my county to have unpermitted work done without affecting the sale/purchase price. Is it required in your county that the seller bring the property up to code before sale? Have you already given notice to your current living situation that you would be moving? We don't know when the agent found out about this issue. If you've used a standard California Association of Realtors contract you'll have more time to figure out what steps are appropriate for you; check your contract to determine how much more time.
What I would do is have your agent write up an amendment to your offer at a lower price and present it to the listing agent. This is what it sound like you want to do. Unfortunately, he/she may not have not know about the bedroom not being permitted and disclosed this information to you when they found out.
You really only have two choices at this point if the seller will not accept a lower price. One, to accept the home without permits and close escrow or two, cancel the agreement.
Good Luck with this and keep us all posted on what happens.