For your example, you must have a property inspection contingency in your original offer. In San Francisco most homes/condos are purchased with the 7 page SFAR contract. A recent change to that contract makes the Property Inspections an automatic contingency that you would have to purposely waive not to have the right to conduct inspections, and ask for concessions for any problems you find that you were not previously aware of. As long as you don't initial the "waive" paragraph, you have the right to ask for concessions after conducting a property inspection.
You can do similar things with other contingencies - for example, if you have an appraisal contingency, and the home appraises for less than your purchase price, you can ask the seller to agree to sell at the appraised value. Please note, in both instances, the seller has the right to refuse your requests for any concession, and if they do, your only two choices are to complete the purchase without the concessions, or to cancel the contract "subject to" your contingency. in a Seller's market, they almost always refused concessions. in today's buyer's market, they are almost always open to negotiation or outright agreement to concession requests.
One final note, I am not a lawyer, and you are strongly advised to discuss all legal matters with an attorney before taking any action.