Skip to contentTalk to us
AI coding

Why AI forgets in long projects, and how to keep it on track

Did the AI forget a decision or repeat an old bug? Understand context windows and AI memory limits, and learn habits that keep long projects on track.

Fanann Team8 min read
WhatsApp
Quick answer

AI forgets in long projects because it has no permanent memory: on each reply it reads only what fits in its context window, and as a conversation grows, older messages get summarized or dropped, so details you agreed on get lost. The fix is to keep a short project brief (users, rules, decisions), work in small tasks, and start a fresh conversation with a clear summary whenever the thread gets long or the agent starts repeating old mistakes.

People look for this as
  • why does ai forget in long conversations
  • what is a context window
  • how to make ai remember my project
  • ai keeps repeating the same mistake
  • when to start a new chat with an ai coding agent

Why does AI forget things in long projects?

If the AI forgot a decision you agreed on days ago, brought back a bug you already fixed, or renamed a field for no reason, that is not a strange glitch; it is a natural result of how large language models work. They have no permanent memory. On every reply they read only the text in front of them, and that text has a maximum size called the context window.

In short projects you never notice, because everything fits. But in a project built over weeks, with hundreds of messages and dozens of files, not everything can be read every time. Older messages get summarized, or only the parts that seem important are kept, and a small detail that mattered a lot to you can get lost along the way, like the rule that bookings cannot be cancelled less than two hours before the appointment.

The key idea: you own the project's memory, and the AI owns the execution. Once you accept that split, long projects get much easier.

If it is not in the context, it does not exist for the model.

How does AI 'memory' actually work?

You do not need deep technical detail. These five facts are enough:

  1. 1
    Every reply starts from scratch

    The model keeps nothing between replies. What looks like remembering is the conversation and key files being sent to it again each time.

  2. 2
    The window is measured in tokens

    Text is split into small units called tokens. Messages, code and instructions all consume the same space.

  3. 3
    When it fills, things get compressed

    Tools summarize, drop or select parts of older messages to make room. Summaries can lose details.

  4. 4
    More content dilutes attention

    Even when everything fits, lots of irrelevant content makes the model focus less on the instruction you care about.

  5. 5
    The agent reads the project itself

    Modern agents read project files when needed, so decisions written into the code or a project brief are more durable than decisions mentioned in an old message.

For a wider explanation of tokens, context windows and hallucinations in business terms, read LLMs for business owners.

Signs the agent is losing track

SignWhat it usually meansWhat to do
It brings back a bug you fixedThe old fix dropped out of context or was never documentedState the rule explicitly and add it to the project brief
It renames fields or pagesIt cannot see the agreed namesAsk it to read the current data structure before editing
It suggests a feature you rejectedThe decision lived only in an old messageRecord rejected decisions in the brief
It mixes Arabic and English in the UIThe language instruction is no longer visibleRestate language and direction rules at the top of the request
Long, contradictory replies and repeated attemptsThe context is full of failed attemptsStop, summarize and start a new conversation
It invents a table or function that does not existGuessing instead of reading reality (a hallucination)Ask it to check the actual files before answering

The project brief: a source of truth that does not forget

The most powerful habit in long projects is a short project brief that stays current. Not a fifty-page spec, but one or two pages that both you and the agent return to. What goes in it?

  • Goal and users: what the app does and for whom, in two lines.
  • Business rules: cancellation policy, booking limits, how VAT and discounts are calculated, working hours and days off.
  • Agreed technical decisions: core table names, payment methods, sign-in method.
  • Language and design: Arabic first and right-to-left, English as an option, colors and font.
  • What was rejected: features or approaches you decided against, and why.
  • Current status: what is done, what is in progress, what is next.
Prompt to create the project brief

Read the whole project and write a short project brief file in this order: 1. The app's goal, its users and their roles. 2. The business rules currently implemented (cancellation, booking, prices, VAT). 3. The core tables and how they relate, using their current names. 4. The payment, sign-in and notification methods in use. 5. Language, direction and design rules. 6. Features that are done and features still missing. Do not change any code. From now on, follow this brief in every change, and if my request contradicts it, warn me before doing anything.

Try it in Fanann

Daily habits that keep AI on track

  1. One task per request: small requests use less context and produce more precise results. See build one feature at a time.
  2. Restate key rules inside the request: if a feature touches payments, include the payment rule in the request even if it is in the brief.
  3. Ask it to read before writing: 'Read the related tables and pages first, then tell me your plan.'
  4. Keep names fixed: always use the same word for the same thing. Do not say 'order' one day and 'booking' the next if they mean the same.
  5. Update the brief after every decision: an unwritten decision will be forgotten sooner or later.
  6. End each session with a summary: three lines on what is done, what remains and the next step.

If you are at the start of a project, begin with a short requirements document as in write a PRD with AI, then turn it into your living project brief.

When should you start a new conversation instead of continuing?

Keep going in the same thread
  • You are on the same feature and results are still accurate
  • Replies are short and focused
  • The agent follows the rules without repeated reminders
Start a new conversation
  • You moved to a completely different feature
  • Two or more attempts at the same problem failed
  • Old bugs or forgotten decisions reappear
  • The thread is very long and full of experiments that did not work

When you start over, do not start empty. Open with a few lines: what the app is, what works, what you need now, and which rules must not break. Ask the agent to read the project brief before anything else.

A good opening summary looks like this: 'A booking app for a home salon in Jeddah. Working now: phone sign-in, booking, payment with mada and Apple Pay. Needed: a reminder message three hours before the appointment. Rules: do not touch the payment page; the UI is Arabic first, right-to-left. Read the project brief before starting.' Five lines are enough to put the agent back on track.

What does the platform handle for you?

Not all the burden is yours. The Fanann agent reads the project's files and database structure for each task instead of relying on conversation memory alone, plans before it builds, and tests pages after every change. With instant rollback to any earlier version and GitHub sync, the project's history is preserved even when a conversation forgets the details.

But your business rules, your decisions, and what you rejected and why: nobody knows those except you. Write them down clearly once, and you will notice the difference in every request after that.

Key takeaways

  • The model does not remember; it rereads what is in the context window each time, and that window is limited.
  • As conversations grow, older details get summarized or lost, causing contradictions and returning bugs.
  • A short, up-to-date project brief is the strongest tool for keeping the agent on track.
  • Small tasks and clean conversations beat one endless thread.
  • When the agent starts flailing: stop, summarize and start over with clear context.

Frequently asked questions

Why does AI forget things in long conversations?
Because the model has no permanent memory and reads only what fits in its context window on each reply. As the conversation grows, older messages are summarized or dropped and details get lost. The fix is a short project brief and shorter conversations.
What is a context window?
It is the maximum amount of text a model can read at once, measured in tokens. It includes your messages, its replies, files and instructions, all competing for the same space.
Should I start a new chat or continue the same one?
Continue while results stay accurate and you are on the same feature. Start a new chat with a clear summary when you switch features, after two failed attempts, or when old bugs reappear.
How do I make the AI stick to my project's rules?
Write the rules in a project brief and ask the agent to read it before each task, restate the key rule inside the request, and ask it to warn you when a request contradicts the brief.
Do models with bigger context windows solve the problem?
They reduce it but do not remove it. Even with a large window, irrelevant content dilutes focus, and unwritten decisions can still get lost. Organization matters more than size.

Ask your AI assistant about this

Copy this prompt into the AI assistant you use, then add the details of your own case.

I am reading this guide: “Why AI forgets in long projects, and how to keep it on track” https://fanann.com/en/blog/ai-context-long-projects/ My question: why does ai forget in long conversations Use that page as a source and explain the answer step by step for my situation, tell me what to check before I start, and cite the page link.

Terms in this article

Your idea deserves to see the light.

Describe it in Arabic or English and Fanann builds, tests and ships it — no coding knowledge needed. Start free, no credit card.