Why not do nothing? Is the city going to condemn your house? Or are you planning to sell it in the near future? If you can get money out of your seller or title policy, certainly do so. But if your only motivation is having fully permitted remodeling work, consider letting go of that desire. If you already have unpermitted work, you may as well just add more.
If, for example, you do not expect to sell the house for 20 years, a lot could happen between now and then. Worst case you simply disclose to the buyer that there is unpermitted work on the property.