Founder's Notes • June 10, 2026

The Day Our AI Started Hallucinating and How We Fixed It in 4 Hours

An open postmortem on a bad prompts deployment, the debugging tools we used, and why we rebuilt our playground compare mode.

By ShashankFounder, trained.chat

At 2:14 AM on June 10, our alert pager went off. Our own website support agent was stuck in an infinite loop, hallucinating fake help documents to active visitors. Here is the postmortem of those four hours.

4 hrs
Response to patch time

to identify the template variable error, deploy hotfixes, and reset sync threads.

34
Impacted users

who received hallucinated fallback answers before sync sync was paused.

100%
Regressions prevented

after rolling out system prompt testing checks inside our new Playground Compare mode.

Failures are documentation opportunities in public.

Building in public means owning your mistakes. On June 10, a minor optimization to our core instructions parser caused our live support agent to run into a prompt-formatting loop, hallucinating gibberish links on our home page.

What Happened

We updated our system prompt parsing package to resolve nested variable tags in template strings. However, a edge case in template formatting caused variables to render as undefined, corrupting the prompt system instructions. The agent fallback defaulted to general instructions, causing it to hallucinate mock answers for help center requests.

The 4-Hour Fix

Within ten minutes of user bug reports, we halted the automated prompt sync. We deployed hotfixes to roll back template parsing dependencies to the previous stable release.

To prevent future instruction issues, we built our Playground Compare Mode. Developers can now run multiple model parameters and prompt versions side by side in a safe testing sandbox before saving edits to production.

Product Release Mapping:Shipped in trained.chat v1.2

What changed in trained.chat because of this lesson?

Added automated test assertions to system prompt changes
Deployed multi-model Playground Compare mode
Implemented automated loop-breaker safety middleware

"Continuous prompt monitoring is not a safety metric. It is a live operations requirement."

The Column