---
title: "AI Loses Context: Find the Cause and Restore It"
description: "AI loses context when text leaves the window or receives less attention. Use a planted-marker test to identify the cause, then restore the missing detail."
canonical: "https://scalewithsearch.com/articles/why-does-ai-lose-context-mid-conversation"
date: "2026-01-28"
modified: "2026-11-10"
---
## Site navigation

- [Scale With Search](https://scalewithsearch.com/)
- Services
  - Local
    - [All services](https://scalewithsearch.com/services)
    - [AI visibility tracking](https://scalewithsearch.com/services/ai-visibility-tracking)
    - [Google Maps rank tracking](https://scalewithsearch.com/services/google-maps-rank-tracking)
    - [Local SEO](https://scalewithsearch.com/services/local-seo)
    - [Google Business Profile management](https://scalewithsearch.com/services/google-business-profile)
  - Website and search
    - [SEO solutions](https://scalewithsearch.com/seo)
    - [Technical SEO](https://scalewithsearch.com/seo/technical-seo)
    - [On-page and content SEO](https://scalewithsearch.com/seo/on-page-and-content-seo)
    - [Semantic SEO and topical authority](https://scalewithsearch.com/seo/semantic-seo-and-topical-authority)
    - [Custom SEO tools](https://scalewithsearch.com/seo/custom-seo-tools)
    - [YouTube AI visibility](https://scalewithsearch.com/seo/youtube-ai-visibility)
    - [YouTube citation tracking](https://scalewithsearch.com/seo/youtube-ai-visibility/citation-tracking)
    - [YouTube channel audit](https://scalewithsearch.com/seo/youtube-ai-visibility/channel-audit)
    - [Site build](https://scalewithsearch.com/work#site-build)
    - [Whole website fix](https://scalewithsearch.com/work#whole-website-fix)
  - AI functions
    - [AI operations](https://scalewithsearch.com/ai-systems)
  - First step
    - [Working session](https://scalewithsearch.com/audit)
  - Start here
    - [Send your brief](https://scalewithsearch.com/work#send-your-brief)
    - [Example scope](https://scalewithsearch.com/work#review-the-example-scope)
    - [Prices and terms](https://scalewithsearch.com/work#prices-and-terms)
- Industries
  - Agencies
    - [SEO agencies and consultants](https://scalewithsearch.com/for/seo-agencies-and-consultants)
    - [Marketing agencies and freelancers](https://scalewithsearch.com/for/marketing-agencies-and-freelancers)
    - [AI visibility check for SEO agencies](https://scalewithsearch.com/check/seo-agencies-and-consultants)
    - [Marketing and SEO agencies](https://scalewithsearch.com/for/#group-agencies)
  - Browse by business
    - [Trades and field service](https://scalewithsearch.com/for/#group-trades)
    - [Real estate agents and teams](https://scalewithsearch.com/for/real-estate)
    - [Health, wellness, and animal care](https://scalewithsearch.com/for/#group-practices)
    - [Chiropractic and wellness practices](https://scalewithsearch.com/for/chiropractic-and-wellness-practices)
    - [Law, finance, and IT](https://scalewithsearch.com/for/#group-professional)
    - [Machine shops and manufacturers](https://scalewithsearch.com/for/#group-manufacturing)
    - [Restaurants, shops, studios, and nonprofits](https://scalewithsearch.com/for/#group-local-services)
  - [All industries](https://scalewithsearch.com/for/)
- Resources
  - Free tools
    - [AI visibility check](https://scalewithsearch.com/check)
    - [All free tools](https://scalewithsearch.com/tools/)
    - [Free starter kit (.zip)](https://scalewithsearch.com/kit/business-memory-starter-kit.zip)
  - Guides
    - [AI-native library](https://scalewithsearch.com/ai-native)
    - [Industry intelligence](https://scalewithsearch.com/intelligence)
    - [Office job guides](https://scalewithsearch.com/guides/)
    - [Business memory](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [Agent governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [Ownership and migration](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - Articles
    - [All articles](https://scalewithsearch.com/articles/)
- About
  - Evidence
    - [Proof](https://scalewithsearch.com/proof)
  - Scale With Search
    - [About](https://scalewithsearch.com/about)
    - [How it works](https://scalewithsearch.com/how-it-works)

# Find Out Why AI Lost a Detail Mid-Conversation and Restore It.

Built from 5 notes in Victor's vault. Drafted with Claude Opus 5.5 and Claude Fable 5.1, rewritten against Victor's notes with Claude Opus 5.5. Reviewed by Victor on 2026.11.11.

AI loses context when text leaves the window or receives less attention. Use a planted-marker test to choose your fix. You are 20 messages into a conversation. You explained the project, the constraints, and the goals, and the AI has handled every request well.

Then it asks a question you answered in message 5.

You did not start a new chat. The detail is still on your screen. The AI lost it anyway. There are two different causes, and each one has a different fix.

## Know the two causes

**Truncation.** The text left the model's context window. Near the window limit, a product drops the oldest messages or replaces them with a summary. The model cannot use what it no longer receives.

**Attention loss.** The text is still in the context window, but the model uses it less. Long inputs spread the model's attention unevenly, and some parts get less weight than others.

The symptom looks the same: the AI acts as if you never said it. The fix is not the same. If you fix the wrong cause, the detail stays lost.

## Know the window limits

The context window holds everything the model can see for one answer: your messages, its replies, and any files you added. The model answers whatever sits in that window, and nothing past the edge of it. The window is measured in tokens, and one token is about three quarters of an English word.

Limits differ widely. In ChatGPT, the window differs by plan and by model, and OpenAI's plan page lists the current figures. Claude Sonnet 4.5, released in September 2025, accepts 200,000 tokens, about 150,000 words. Google opened Gemini 1.5 Pro to up to 2 million tokens through its API in June 2024. Check current figures on each vendor's page. Windows keep growing, and every one still has a limit.

A 32,000-token window sounds large. Pasted documents, code, and long replies fill it faster than a count of messages suggests. The product gives no warning as you approach the limit. The answers get worse without notice.

## Know how attention spreads

The model uses an attention mechanism to decide which parts of the context shape each answer. A 2023 study found that models use information at the start and end of a long input more reliably than information in the middle (Liu et al., "[Lost in the Middle](https://arxiv.org/abs/2307.03172)").

In a 40-message conversation, messages 10 to 20 sit in the weakest spot. The last 5 to 10 messages get the most weight. New information late in a conversation can outrank anything you said earlier.

Cost adds pressure. In the standard transformer design, the work to process the context grows quadratically with its length, not exponentially. Twice the context means about four times the work. Near the limit, products manage that cost. They drop or summarize older turns.

A November 2024 blog post by James Howard called this gradual loss of coherence "context degradation syndrome." It is a useful label, not a documented property of a model. The pattern it describes has four stages:

1. If the product summarizes, early context gets compressed, and details drop out.
2. Middle context gets less weight.
3. Recent context dominates the answers.
4. Output quality falls. The AI contradicts itself, repeats questions, and forgets shared decisions.

## Run the planted-marker test

This test tells truncation from attention loss. Do not take the model's word that it remembers. Test it. Use harmless facts.

1. In your first message, plant marker A: "For this project, the client's fiscal year ends in June."
2. Around the middle of the work, plant marker B: "Reports use the client's term 'members', not 'customers'."
3. Continue the real work as usual.
4. Every 10 messages, ask: "What is the client's fiscal year end? Quote the message where I stated it."
5. Ask the same for marker B.
6. Also ask for a draft that needs both facts, without a mention of either.
7. Record the results for each checkpoint.

Read the results this way:

| Direct question | Draft that needs the fact | Likely cause |
|---|---|---|
| Quotes the marker exactly | Uses the fact | No loss yet |
| Quotes the marker exactly | Ignores the fact | Attention loss: the text is present but underused |
| Gives a paraphrase with wrong details | Uses a wrong version | Summary compression |
| Says it has no such information | Ignores the fact | Truncation: the text left the window |

The second row matters most. A model that can quote the fact and still writes without it sounds sure of itself. A confident wrong draft looks the same as a confident right one, so the draft check catches what the direct question misses.

To estimate the conversation's size, paste the text into a token counter, such as the tokenizer page OpenAI publishes. Compare the count with your plan's window.

## Apply the fix that matches the cause

**For attention loss,** bring the fact back near the current turn. Restate the constraint in your next message. For long work, keep a short block of fixed constraints and paste it again every 10 to 15 messages. Better still, move the constraints into a file that loads at the start of each session.

**For truncation or summary compression,** a restatement helps only until the window fills again. Start a new session instead. Carry the settled state across in a checkpoint file, not in a pasted summary you have not checked. The [ChatGPT same-chat guide](/articles/why-chatgpt-forgets-same-chat) gives a checkpoint format and a restart test.

**For both,** keep the lasting context out of the thread. The [comparison of context windows and persistent memory](/articles/context-window-vs-persistent-ai-memory) explains why a bigger window does not solve this.

## Know why the common workarounds do not scale

People try four fixes:

- **Summaries at the top.** You summarize the first 20 messages and paste the summary into a new chat. It keeps what you decided and loses why.
- **Scheduled restarts.** You start a new chat every 10 to 15 messages and paste a summary. It works, but you now manage the AI's memory by hand.
- **Memory features.** You tell ChatGPT to remember key points. Memory keeps a preference, not the reasoning behind it.
- **Message references.** "As I mentioned in message 8" makes the model look back some of the time. It may skim or misread message 8.

Each fix makes you the memory manager. Each summary depends on your guess about what matters, and a wrong guess cannot be recovered. A better prompt fixes this hour. It does nothing for the next one.

## Move critical context into a file

Do not fight the context window. Put the project background, goals, constraints, and past decisions in one Markdown file in your working folder. Update it as the project changes.

Claude Code reads a file named `CLAUDE.md` from the project folder when a session starts. The file enters the context before the conversation begins, so it sits at the front, where recall is strongest. Every new session reads the current version in full. Nothing in it has been summarized or pushed to the middle.

The file does not make a single session immune. In a very long session, the file loses weight like any early text. The difference is recovery. A new session reloads it at full strength, so a restart costs little.

Structure the file in the order the model needs it: background first, then current goals, then past decisions and rejected options. You decide what goes in. If the AI keeps missing a fact, you edit the file instead of guessing which message it ignored.

Keep the file precise, not complete. I keep my own context files thin. Each one routes the model to a detail file when the question needs it, instead of holding everything in one place.

ChatGPT and Gemini do not read a folder on your disk when a chat starts. There, add the file to a Project or a Gem, or upload it at the start of the session. The guide to [why AI gets worse in long conversations](/articles/why-does-ai-get-worse-in-long-conversations) includes a handoff procedure that turns a degraded thread into an updated file.

## Watch for the next occurrence

After you fix the cause, keep the markers. Plant the same two facts at the start of your next long session, and check them at message 20 and message 40. If the direct question still works but the drafts ignore the facts, the file or constraint block needs a stronger position. If the direct question fails, the session ran past the window, and the restart point should come earlier.


## More reading on AI detail loss mid-conversation recovery

- [Restart a long AI conversation before its answers get worse](/articles/why-does-ai-get-worse-in-long-conversations)
- [Test seven context window myths before you buy a bigger window](/articles/#cluster-ai-memory)<!-- reading-origin:XSgvYXJ0aWNsZXMvYWktY29udGV4dC13aW5kb3ctbXl0aHMp -->
- [Why ChatGPT Forgets Things in the Same Chat and How to Preserve the Working State](/articles/why-chatgpt-forgets-same-chat)

----

```text
                  .|########||.                                       .|########||.                                       .|########||.
               |##||.      .||##|.                                 |##||.      .||##|.                                 |##||.      .||##|.
             |#|.              .|#|.                             |#|.              .|#|.                             |#|.              .|#|.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
        .#.                          .#|                    .#.                          .#|                    .#.                          .#|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
      |#             ......             #|                |#             ......             #|                |#             ......             #|
     .#           ||#########|           #|              .#           ||#########|           #|              .#           ||#########|           #|
    .#.         |######||######|.        .#.            .#.         |######||######|.        .#.            .#.         |######||######|.        .#.
    #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#
   ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||
   #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #
 ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||
 #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#
 #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.
.|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||
||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||
#.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#
#    .||####|###########################|.     #    #    .||####|###########################|.     #    #    .||####|###########################|.     #
#      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #
#      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #
#      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #
#      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #
#   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #
#. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#
|| |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||
|| ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||
.# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.
 #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#
 ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||
  #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.
   ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||
    #.        .######|#|#########|        .#            #.        .######|#|#########|        .#            #.        .######|#|#########|        .#
    .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.
     |#           ||########||           #.              |#           ||########||           #.              |#           ||########||           #.
      |#             ......             #|                |#             ......             #|                |#             ......             #|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
        |#.                          .#.                    |#.                          .#.                    |#.                          .#.
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
            .|#|.              .|#|.                            .|#|.              .|#|.                            .|#|.              .|#|.
               |##||.      .||##|                                  |##||.      .||##|                                  |##||.      .||##|
                 .||########||.                                      .||########||.                                      .||########||.

Scale With Search  2026  [scalewithsearch.com](https://scalewithsearch.com)
```
