Who is liable for bugs in code that an AI has written?
In short
Who is liable for bugs in code that an AI has written? Whoever delivers the code, not the AI tool. Under German law you answer to your client as for code you wrote yourself, and for software placed on the market from 9 December 2026 also without fault under the new product liability rules. IT liability cover for freelancers costs about EUR 590 to 700 a year; get written confirmation that it includes AI code.
Published premiums in Germany for covers that can absorb bugs in AI-generated code.
Example
Typical range
IT freelancer, EUR 75,000 to 100,000 turnover, EUR 1 million financial loss, EUR 2 million general liability, cyber add-on EUR 150,000
EUR 588 net, EUR 699 gross a year
Extended product liability for small businesses
about EUR 200 to 500 a year
Cyber insurance for software development, EUR 750,000 to 1 million turnover, sum insured EUR 250,000
from about EUR 646 a year
Guide values as of October 2026 from published premium examples;
the product liability range dates from 2023.
The loss amounts in the worked example are guide values from quoting practice (Richtwert aus der
Angebotspraxis).
Your premium depends on turnover, sum insured and activity.
Worked example
Freelancer in Munich builds a web shop interface with AI
An AI generated calculation bug sets wrong prices for a week and the shop sells below cost.
Shop's loss from wrong prices
about EUR 20,000
Debugging and expert report
about EUR 3,000
Code tested before delivery
no
The freelancer is liable under the contract for around EUR 23,000. IT liability pays if it does not exclude AI use; product liability does not apply because only a financial loss occurred.
Why you are liable for AI code as for your own code
Legally an AI coding tool is an aid, like a compiler or a library. If you have AI write code and deliver it to a client in Germany, you owe a defect free work under section 633 of the Civil Code (BGB). Whether a bug came from you or from the AI does not change the defect.
The client can claim damages if you breached a duty and are responsible for it (section 280 BGB). Taking over AI code without review is usually negligent, because checking code is part of normal professional care.
What changes for AI code from 9 December 2026
Under EU Directive 2024/2853 software becomes a product. The Bundestag passed the new Product Liability Act (Produkthaftungsgesetz) on 8 October 2026; it is due to take effect on 9 December 2026. Anyone placing software with AI code on the market from then is liable without fault if a bug injures people, damages things or destroys private data.
Whether the code was written by hand or by an AI makes no difference. Security gaps in AI code that are not closed by updates can also lead to liability.
Claim
Who is liable
Condition
Defect in the work
supplier of the code
code does not match what was agreed
Contract damages
supplier of the code
breach of duty, for example missing review
Product liability from 9 Dec 2026
maker of the software
bug causes injury, property damage or private data loss
Defect in title
supplier of the code
AI copies third party code with licence obligations
Licence risks in AI-generated code
AI coding tools can reproduce parts of third party code that comes with licence obligations. If you ship such code without the licence notice, this can be a defect in title that you have to answer for.
Scan AI code with a licence checking tool before it goes into the product, and record which parts were created with AI.
Does IT liability insurance pay for bugs in AI code?
IT liability insurance (IT-Haftpflicht) covers financial losses your clients suffer through errors in your work, for example an outage caused by faulty code. Explicit rules on AI-generated code are still rare in policy wordings.
Ask your insurer whether AI use in programming is included and get it in writing. Answer proposal questions about AI truthfully, otherwise you risk losing cover under section 19 of the Insurance Contract Act (VVG).
When the client cannot hold you liable
If you work as an employee, your employer is the client's contract partner and is liable towards the client. Your own IT liability cover matters mainly for freelancers and firms.
If the client created the AI code and only asked you to integrate it, your liability follows your assignment: you answer for a review only if one was agreed.
Norman Nammert arranges IT and product liability cover for developers who code with AI, acting as an insurance broker (Versicherungsmakler). The insurer pays the commission, so the advice is free of charge for you.
Step by step
Treat AI code like third party code: read, test and review it.
Agree in writing with the client whether and how AI is used.
Scan AI code for licences and security gaps.
Check IT liability for AI exclusions and get inclusion confirmed.
From 9 December 2026, check whether your software counts as a product under the new rules.
Checklist
Tests and code review for every AI contribution
Licence check before delivery
IT liability without an exclusion for AI tools
Product liability including software if you sell software
Contractual cap on financial losses where legally allowed
Common mistakes
Taking AI code over unchecked because it seems to run
Thinking the vendor of the AI tool is liable
Not declaring AI use on the proposal form
Questions and answers
Frequently asked
Can I claim against the vendor of the AI tool?
Towards your client you are liable.
Whether you can recover from the vendor depends on its terms of use;
plan your risk without counting on it.
Do I have to tell the client that AI wrote the code?
There is no general legal duty for program code, but many clients regulate it in the contract.
Clear agreements avoid disputes when a bug appears later.
Is an employed developer liable for bugs in AI code?
Towards the client the employer is usually liable, because it signed the contract.
Own IT liability cover matters mainly for freelancers and firms.
Does the new product liability cover single pieces of code?
It covers software as a product and components built into a product under the manufacturer's
control.
It does not cover pure financial losses of business customers.
What does IT liability insurance cost for developers in Germany?
A published example for an IT freelancer with EUR 1 million cover is EUR 588 net a year,