# Why the AI keeps forgetting what you told it — and how to stop it

The model has no memory of its own. Once a conversation outgrows its window, your earlier decisions quietly fall out. See what drops, what gets summarised, and the habit that keeps what matters in view.

Updated Oct 3, 2026 · By Ari Vale

This page has referral links: we earn a commission if you buy, at no cost to you.

Have a long coding chat below, then ask about the very first thing you said.

It's gone. Not deleted from your screen, but no longer on the model's desk. The **[context window](https://aliteq.com/what-is-a-context-window)** moved on.

The model doesn't remember your chat. Each time, the app sends it the conversation again. Anthropic's [docs](https://docs.claude.com/en/docs/build-with-claude/context-windows) describe each turn's input as "all previous conversation history plus the current user message".

When the history gets too long, something has to go. Anthropic notes that chat interfaces "can also manage the context window on a rolling 'first in, first out' basis." Oldest first.

### Three ways a long chat loses detail

|   | What happens |
| --- | --- |
| Trimming | The oldest messages drop off the front |
| Summarising (compaction) | Old messages are replaced by a shorter summary; detail is lost |
| Context rot | Everything is still there, but accuracy drops as it grows |

Summarising has a name. Anthropic calls server-side compaction "the primary strategy for context management" for long-running conversations.

So when a vibe-coding session suddenly ignores a decision from an hour ago, it usually isn't stubbornness. The decision fell out, or got summarised away. The fix has a name, context engineering, and a short list of habits.

> **What this means for your app**
>
> Keep a short project notes file (what the app does, key decisions, what not to touch) and ask your tool to read it at the start of each session. Start a fresh chat for each new feature. Restate the one rule that matters when you ask for a change.

**Try it with the rules off.** In the sandbox, switch trimming off and keep chatting until the window overflows. Then switch summarising on and see which details survive the summary.

## You now understand

- The model only knows what's in its context window right now
- Long chats get trimmed (oldest first) or summarised
- A notes file and fresh chats keep key decisions in view

If you use [Claude Code](https://aliteq.com/how-to-use-ollama-with-claude-code), the /compact vs /clear guide explains what each command keeps, what auto-compact does on its own, and why CLAUDE.md survives both.

This guide is part of our [How much VRAM do you need to run an AI model](https://aliteq.com/how-much-vram-do-you-need-to-run-ai-models) guide. Related guides: [Out of memory at long context](https://aliteq.com/kv-cache-quantization-explained), [what is quantization, and why it's the reason you can run AI on a normal PC](https://aliteq.com/what-is-quantization-llm-explained), [Why do some huge MoE models run faster than small dense ones?](https://aliteq.com/moe-vs-dense-ai-models-explained).

## Check yourself

**Q: Why does the AI forget what I told it earlier?**

A: Because it only sees its context window. In long conversations, the oldest messages get trimmed or summarised to make room, so earlier details may no longer be in view.

**Q: Does the AI remember my previous chats?**

A: The model itself doesn't. Anything it seems to remember has to be sent back into the context window by the app.

**Q: What is compaction?**

A: Replacing older parts of a conversation with a shorter summary so it fits in the context window. It saves space but loses detail.

**Q: How do I stop a coding AI forgetting decisions?**

A: Keep key decisions in a short notes file it reads each session, start fresh chats for new features, and restate important rules when you ask for changes.

## Sources

- [Anthropic docs — Context windows (read Sep 25, 2026)](https://docs.claude.com/en/docs/build-with-claude/context-windows)
- [Higgsfield plans and pricing (official page, checked Dec 2, 2026)](https://higgsfield.ai/pricing?fpr=lax-8e2251&fp_sid=why-ai-forgets-context-window-explained--md)
- [Illustration generated with Higgsfield](https://higgsfield.ai?fpr=lax-8e2251&fp_sid=why-ai-forgets-context-window-explained--md)

---

Canonical: https://aliteq.com/why-ai-forgets-context-window-explained

This page has referral links: we earn a commission if you buy, at no cost to you.
