- Published on
Your AI Does Not Learn From Its Mistakes
- Authors

- Name
- Adrian Gan
- @AdrianGanJY
The Illusion of Learning
Here's something nobody tells you about AI agents: they don't learn from their mistakes.
Not really. Not unless you build a system that forces it.
I've been running AI agents for months — coding agents, operations agents, planning agents. And I've discovered something uncomfortable: an agent can make the same mistake in every session. It can be corrected, say "great lesson, I'll remember that," and forget everything the next time it boots up.
The agent isn't lying. It genuinely processes the correction. It adjusts its behavior in that session. But when the next session starts with a fresh context window, everything it "learned" is gone. Vanished. Like it never happened.
This is the fundamental problem with LLM-based agents: noticing is not learning.
Three States of Knowledge
Through building and operating my own agentic system, I've arrived at a framework for thinking about this:
| State | What it means | Does it persist? |
|---|---|---|
| Noticed | The agent is aware of something in this session | ❌ |
| Learned | The agent recorded it somewhere it will be loaded next session | ✅ |
| Applied | The recording changed the agent's behavior — not just its memory | ✅✅ |
Most people stop at "noticed." The agent sees the error, adjusts in real-time, and everyone moves on. The problem is that "noticed" has a shelf life of exactly one session.
"Learned" is better. You write the lesson to a memory file, a rules document, a knowledge base. Next session, the agent loads it. It remembers. But remembering isn't the same as acting differently.
"Applied" is where the magic happens. Applied means the lesson didn't just get written down — it changed the procedure. A workflow was updated. A rule was tightened. A skill file was modified. The agent doesn't just know the lesson — it behaves differently because of it.
The Cognitive Memory Model
This maps cleanly to how cognitive science thinks about memory:
- Episodic memory = session logs, conversation records. "What happened."
- Semantic memory = facts, rules, knowledge base entries. "What I know."
- Procedural memory = workflows, skills, habits. "How I do things."
Most AI memory systems focus on episodic and semantic. RAG over your documents. Vector search over past conversations. That's useful, but it's not learning.
Real learning — the kind that changes behavior — lives in procedural memory. And procedural memory, for an AI agent, means the workflows, skills, and rules files that shape how the agent acts.
A lesson in your memory file is semantic. It's a fact the agent can recall. A changed workflow is procedural. It's a behavior the agent can't not do.
The Learning Pipeline
So what does a working learning system look like? Here's what I've built:
Step 1: Notice — The agent makes a mistake or Adrian (that's me) corrects something. The agent is aware.
Step 2: Record immediately — Don't wait until the end of the session. Don't say "I'll remember that." Write it to the memory file now. Mid-conversation. Mid-task.
Step 3: Apply if possible — Ask: "Can I change a workflow or rule right now to encode this?" If the mistake was caused by a stale path in a config file, fix the config file and update the evolution workflow to catch stale paths in the future.
Step 4: Catch stragglers — At the end of every session, run a learning extraction workflow. Scan for anything that was noticed but not yet recorded or applied.
Step 5: Daily safety net — Run an evolution sync at least once per day. This catches structural drift — renamed files, moved folders, outdated references — that no single session would notice.
The key insight: the primary learning moment is when the mistake happens, not at wrapup. Wrapup is the backup. Real-time recording is the priority.
My Hypothesis
I'm currently tracking a hypothesis that I think is true but haven't proven yet:
Agents do NOT auto-learn from mistakes without being explicitly prompted to.
The bar for disproving this is high. I need to see:
- Five lessons auto-recorded by agents without me calling the learning workflow
- Two to three days of work where I don't have to point out an unlearned lesson
Until both criteria are met, I'm assuming the system does not self-heal. And I'm designing accordingly.
What This Means For You
If you're building with AI agents — whether it's a coding assistant, a business operations agent, or a personal productivity tool — here's my advice:
Don't trust "I'll remember that." The agent won't. Not next session, not tomorrow, not ever. Unless it writes the lesson down in a file that gets loaded on startup.
Build a learning pipeline, not just a memory store. Memory stores are passive. Learning pipelines are active. They don't just record — they transform. A recorded lesson becomes a changed procedure.
Invest in procedural memory. Workflows, skills, rules — these are the files that change behavior. A thousand facts in a knowledge base matter less than one well-placed rule in a workflow file.
Make learning a first-class operation, not an afterthought. Don't bolt it on at the end. Build it into the core loop. When a mistake happens, the system should be recording and applying in real-time, not hoping someone remembers to run the learning script later.
The AI doesn't learn from its mistakes. But if you build the right system around it, the system learns. And that's what matters.
Adrian Gan is the CEO of Mipos Sdn Bhd and builder of the Agentic Hub — a personal command center for AI-augmented knowledge work. He writes about context engineering, agent systems, and the pursuit of business freedom by 40.