Why AI Agents Fail in Production: 5 Causes and Fixes A practitioner running AI on multilingual customer service email and chat described five causes of agent failures in production and the fixes that worked, including a pre-model extraction step that distills long ticket threads into sourced structured facts, and pruning contradictory prompts. In one case, a prompt grown past 9,000 characters produced inconsistent outputs for the same input until it was cut to just over 3,000 characters of short, separate rules, which made it stable. The practitioner also reported that supplying missing context, such as today's date, resolved errors that adding rules had not. Everything works in the demo, then real work arrives and results become hit and miss. That is the complaint we hear most. Switching to a more expensive model often does not help, because the problem is usually not the model. We run AI on live customer service email and chat, in several languages, and each of the five causes below is one we hit there, with what it looked like and the fix that actually worked. The easy approach is to give the model the whole email thread, the full ticket history and every retrieved document, and let it work it out. It then misses what matters in the long material. In one ticket with more than twenty back-and-forth messages, we had already promised the customer a full refund once the return reached the warehouse. The model writing the next reply did not notice and contradicted it. In another, the case history ran to hundreds of thousands of characters, and the model asked the customer to re-film a video they had already sent. A stronger model given the same pile got it right, which tells you what was missing: not material, but distillation. The fix is a step before the model, done by code or a dedicated extraction pass, that turns the material into a few lines of structured facts. What the customer wants this time, what we promised before, what has been done, what the customer has already sent, verified order and shipping status, what is still missing, and where things conflict. Every line carries its source and date. Original text appears only as a one- or two-sentence quote, never as whole messages. Prompts usually grow like this: one case goes wrong, add a sentence; another goes wrong, add another. A few months later, several of the dozens of rules contradict each other, and the model can only satisfy one side, or it makes something up. It happened on our own content pipeline. The prompt said "always give the place name in Chinese and English", "always give a number when mentioning a cost", and "never invent a business name". When the source material had no shop names or prices, the first two rules forced the model to write something and the third forbade inventing it. It chose to invent. Changing the first two to "write it only if the material has it; otherwise tell the reader how to look it up" made the invented shop names disappear. Another prompt that had grown past 9,000 characters gave noticeably different outputs for the same input; cutting the duplicates and contradictions and restructuring it into short, separate rules at just over 3,000 characters made it stable. So when something breaks, look for what to delete first: repeated explanations, conflicting rules, unnecessary steps. If you must add something, add a general principle, not a patch for one case. When the AI gets something wrong, the reflex is to add a rule. It works better to ask: how did I know it was wrong, and what information did I use? Once the AI answered a question about a promotion incorrectly. Going back over it, we realised we only knew the right answer because we knew today's date, and the model had not been given today's date. Giving it the date fixed it, without a single new rule. Most "the AI's judgement is off" problems are like this: the fact needed to decide is in a person's hands, not the model's. Connecting that fact beats teaching the model to guess. For lookups, also watch how failure is reported, as covered in AI agent vs workflow https://ai.dingboai.com/en/ai-agent-vs-workflow.html . Material usually passes through filtering, trimming, link removal and compression before the model sees it. When these steps go wrong they do not throw errors; replies just get worse. We once stripped video links out of knowledge-base content with a filter that split text at full stops. The source wrote the part, the action, the cause and the fix as one long sentence joined by commas, so the whole troubleshooting procedure was deleted along with the link. Customers asking how to fix a problem got a reply that only said to contact their dealer. Truncation does the same thing: cut long text at a character limit and the sentence you lose is often the one that mattered. The fix is unglamorous. Before changing any step that feeds the model, run one real source text through it and compare before and after to make sure no business content was lost. Summarise long content; never truncate it. Both extremes are common. One jumps straight to full automation, and the AI promises refunds or compensation on a channel nobody reviews. The other piles blocks onto drafts that a person reviews anyway, so the AI refuses to write whenever it is unsure, and the person ends up writing from scratch. We now split it by whether the output can be taken back. If a person sees it first, such as an email draft waiting for review, rules act as reminders: the draft is still produced and the person decides what to change. If it cannot be taken back once sent, such as unreviewed live chat, the AI never commits the company to anything a person has to carry out, like refunds, replacements, order changes or invoices. It logs a ticket for a person and answers only facts and published policy. Hard blocks belong only at the step where something is actually sent or executed. Take the latest batch of cases the AI got wrong and ask of each: did it have the facts it needed to get it right causes 1 and 3 ? Do two rules in the prompt conflict on this point cause 2 ? Compared with the original, what is missing from what the model actually received cause 4 ? Could this mistake be taken back cause 5 ? Print exactly what the model received and read it. Most problems are found on the spot. If you are still pricing a project, where the money goes in custom AI agent development https://ai.dingboai.com/en/custom-ai-agent-development-cost.html covers which of these work items a quote should include. Originally published at ai.dingboai.com https://ai.dingboai.com/en/why-ai-agents-fail-in-production.html . Dingbo AI builds and runs AI agents for customer service, paid per completed task.