What happens if the previous owner of the house did some repairs but they were not permitted? What happens is that YOU HAVE TO DISCLOSE THAT THOSE NON-PERMITTED REPAIRS were made!
There is a specific question in the Texas Sellers' Disclosure Notice, as required by the Texas Property Code, asking about work or repairs done without a permit.
6. Are you (Seller) aware of any of the following?
Write Yes (Y) if you are aware, write No (N) if you are not aware.
Room additions, structural modifications, or other alterations or repairs made without necessary permits or not in
compliance with building codes in effect at that time.
So once you, the current homeowner become aware of the unpermitted work, you are on the hook for the disclosure to your subsequent buyer(s). As a result, you have a remedy against that seller if that has occurred.