If you bought a house with code violations, the law puts the repair obligation on you as the current owner, but you likely have a path to recover the money from the seller, and sometimes from your home inspector or insurance. The catch is sequencing. If you rip out drywall or rewire a panel before you document what was there, you destroy the evidence that proves the seller knew and stayed quiet. Handle the paperwork first, then the repairs.
Document Everything Before You Touch Anything
This is the step most homeowners skip, and it’s the one that costs them the most later. Once the wall is open or the panel is replaced, the physical evidence disappears.
Photograph and video every violation from multiple angles. Include any spots where previous repairs look like amateur work or deliberate concealment. Date-stamped images carry far more weight months later than your memory of what a corner looked like. If drywall covers the real problem, photograph the exterior signs that hint at what’s underneath: stains, bulges, patch lines, mismatched paint.
Get written repair estimates from at least two licensed contractors. These estimates put a number on your damages and anchor any demand letter or lawsuit. Ask each contractor whether the condition looks recent or long-standing. That observation helps prove the seller lived with the problem and knew about it.
Pull your purchase records together in one place: the seller’s disclosure form, the home inspection report, the purchase agreement, and the listing materials. If the listing advertised “updated electrical” and your electrician finds knob-and-tube behind the walls, that printout becomes a key exhibit. You may need all of this for a demand letter, a small claims filing, or a full lawsuit, and reassembling it later is harder than saving it now.
Call Your Local Building Department
If you already received a notice of violation, call the issuing office promptly. If you found the problem yourself, contact your local building or code enforcement office proactively. Either way, the goal is to nail down exactly what has to be fixed and how long you have.
Ask about the compliance deadline. Most municipalities give owners a set window to correct violations before fines begin. Windows vary widely by jurisdiction, from as few as ten days for safety hazards to 30 days or more for less urgent issues. Knowing the deadline lets you plan the repairs without paying penalties you could have avoided.
If the work is complex or expensive and you can’t meet the original deadline, ask for an extension. Many code enforcement offices grant more time when the owner shows good faith, such as already having a contractor lined up or permits in progress. Extensions aren’t automatic, but arriving with a plan and a timeline works far better than ignoring the notice.
Bring the Property Into Compliance
The obligation to fix code violations follows the property, not the person who created the problem. You can pursue the seller for reimbursement later. The city looks to you for compliance right now.
Most corrective work requires a building permit. Doing the work without one stacks a second violation on top of the first, and some jurisdictions charge penalties that are multiples of the standard permit fee when they catch unpermitted work. Pull the permit first, even if the repair feels small.
Ignoring the violation is the most expensive option available. Fines can accrue daily, and many municipalities can place a lien on the property for unpaid penalties. A lien shows up on title searches and makes selling or refinancing extremely difficult.
Hire licensed contractors. Licensed pros know current code, can pull permits on your behalf, and their work will pass inspection. Keep every receipt and invoice, because those are the damages you’ll be claiming against the seller.
Who Might Owe You Money
The Seller
In most states, sellers must disclose known material defects, and code violations qualify. The seller fills out a disclosure form before closing, and false answers or deliberate omissions on that form create liability. The key word is “known.” If the seller genuinely didn’t know, the disclosure obligation generally doesn’t apply. But circumstances often say otherwise. A homeowner who lived in the house for 15 years and never noticed the basement floods every spring is a hard sell to a judge.
A handful of states still follow the “buyer beware” doctrine and don’t require a formal disclosure form: Alabama, Arkansas, Georgia, Montana, West Virginia, and Wyoming. Even there, a seller who actively lies about or hides a defect can still face a fraud claim. Buyer beware means you bear the risk of what you didn’t discover, not that the seller gets to lie.
An “as-is” clause in your purchase agreement does not let the seller off the hook for fraud or active concealment either. Selling as-is shifts the risk of unknown defects to the buyer, but it assumes the buyer was told the material facts. If the seller knew about the violations and stayed quiet, as-is won’t protect them.
The Home Inspector
Inspectors perform visual, non-invasive examinations. They look at what’s visible and accessible, not behind walls or under floors. If a violation was hidden inside a wall cavity, a competent inspector wouldn’t be expected to find it. But if the signs were visible and the inspector missed them, you may have a claim.
The practical challenge is that most inspection contracts cap the inspector’s liability, often at the cost of the inspection itself or a small multiple of it. Courts enforce those caps in most states, though several states restrict how far an inspector can limit liability. Read your contract. If the inspector was grossly negligent rather than merely careless, the cap may not hold up.
The Real Estate Agents
Both the listing agent and the buyer’s agent have a duty to disclose material facts they personally know about. An agent who knew about violations and stayed silent faces potential professional discipline and civil liability. Agents are not inspectors, though. Their obligation is limited to what they actually knew, not what a thorough investigation would have found.
How to Recover Your Repair Costs
Start With a Demand Letter
Before filing anything in court, send the seller a formal demand letter. Identify the code violations, describe how they were concealed or omitted from the disclosure, state the cost of repairs, and request reimbursement within a specific timeframe. Give the seller 10 to 30 days to respond. A well-documented demand letter with contractor estimates and photographs attached resolves a surprising number of these disputes without litigation, because the seller’s attorney can see the evidence and advise settling.
Send it certified mail with return receipt requested. That creates proof of delivery if the case goes to court.
Small Claims Court
If the repair costs fall within your state’s small claims limit, this is the fastest and cheapest route. Limits range from $2,500 to $25,000 depending on the state, with most falling between $5,000 and $12,500. You don’t need a lawyer, filing fees are low, and cases usually reach a hearing within a few months.
Bring organized evidence: the disclosure form, the inspection report, contractor estimates and receipts, photographs, and any communications with the seller. The judge’s core question is whether the seller knew about the violations and failed to disclose them. Testimony from your contractor about the age and visibility of the problems helps show the defects didn’t appear overnight.
If your costs exceed the small claims limit, you have two options. Waive the excess and file for the maximum, permanently giving up the rest. Or file in regular civil court, which has no dollar cap but involves higher filing fees, longer timelines, and likely attorney costs. For claims in the $15,000 to $30,000 range the choice gets genuinely hard, and a consultation with a real estate attorney is worth the fee.
A Civil Lawsuit
For larger amounts or complex cases, a civil suit against the seller is the primary remedy. The two most common claims are fraud or misrepresentation, where the seller lied about the property’s condition, and breach of contract, where the purchase agreement included warranties the seller violated. Fraud claims can sometimes unlock additional damages beyond repair costs, such as attorney fees or punitive damages, depending on the state.
The burden of proof is on you. You have to show the seller knew and either lied or deliberately omitted. This is where your pre-repair documentation pays off. Evidence that a problem is old, was patched over, or was visually obvious to someone living in the house all strengthen the case.
A Claim Against the Inspector
If the inspector missed something a competent inspection should have caught, you can file a claim against their errors and omissions insurance. Recovery is typically limited by the liability cap in the inspection contract, so check that first. If the cap holds you to the $300 to $500 you paid for the inspection, the claim may not be worth pursuing unless you can argue gross negligence, which would void the cap in many jurisdictions.
Check Your Insurance
Standard homeowner’s insurance does not cover pre-existing code violations. If your home later suffers a covered loss like a fire or storm and rebuilding triggers code upgrades, an ordinance or law coverage endorsement can help pay for bringing the rebuilt portions up to current code. That won’t help with violations that existed before the loss, but knowing what your policy covers is still useful.
Title insurance is a separate question. A standard owner’s policy protects against defects in title, including recorded liens. If a previous owner’s unpaid code violation fines produced a lien recorded before you bought, your title insurance should cover it. Broader endorsements exist for zoning issues and code violations themselves, but they aren’t part of a standard policy.
If the Problem Is Unpermitted Work
Unpermitted work is one of the most common sources of code violations found after purchase. A previous owner finishes a basement, converts a garage, or adds a bathroom without pulling permits, and the work either doesn’t meet code or simply has no official record of approval. This creates trouble beyond the violation itself: your homeowner’s insurance may reduce coverage or raise premiums if it learns about unpermitted alterations.
Start with a licensed contractor’s evaluation of the unpermitted work. They can identify what meets current code, what doesn’t, and what corrections will cost. Then ask your local building department whether retroactive permits are available. Many jurisdictions allow them, though the process typically involves submitting plans, scheduling inspections, and correcting any deficiencies the inspector finds.
Expect retroactive permitting to cost more than doing it right the first time would have. Some municipalities charge penalty fees that are multiples of the standard permit fee for work done without authorization. Leaving unpermitted work in place is worse, though. It complicates any future sale, since buyers’ lenders and inspectors will flag it, and puts you in the same position the seller who burned you was in.
Don’t Miss the Filing Deadline
Every state sets a deadline for suing a seller for undisclosed defects. These statutes of limitations vary by state and by claim type. Fraud claims typically allow a longer window than breach of contract claims, and most states use a “discovery rule” that starts the clock when you discovered or reasonably should have discovered the problem, not when the sale closed.
Even with the discovery rule working in your favor, these deadlines are unforgiving. A common range is two to four years from discovery for fraud claims and somewhat shorter for negligence claims against inspectors or agents. Miss the deadline and you lose the right to sue, no matter how strong the evidence.
If you’ve found code violations and you’re still weighing your options, consult with a real estate attorney before the deadline gets close. Many offer free or low-cost initial consultations. Knowing your deadline prevents the worst outcome: a solid case you can no longer file.