---
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-10-09"
---
## Site navigation

- [Scale With Search](https://scalewithsearch.com/)
- Real estate
  - Real estate
    - [Real estate](https://scalewithsearch.com/for/real-estate)
- Work
  - Start here
    - [Send your brief](https://scalewithsearch.com/work#send-your-brief)
    - [Prepare your six-question brief](https://scalewithsearch.com/work#prepare-your-six-question-brief)
  - Build
    - [Site build, content library with SEO, signal desk](https://scalewithsearch.com/work)
- For your business
  - Trades and home services
    - [Auto body and collision shops](https://scalewithsearch.com/for/auto-body-and-collision-shops)
    - [Foundation and home repair contractors](https://scalewithsearch.com/for/foundation-and-home-repair)
    - [Garage door and fencing contractors](https://scalewithsearch.com/for/garage-door-and-fencing-contractors)
    - [HVAC contractors](https://scalewithsearch.com/for/hvac-contractors)
    - [Janitorial and commercial cleaning companies](https://scalewithsearch.com/for/janitorial-and-commercial-cleaning)
    - [Locksmiths](https://scalewithsearch.com/for/locksmiths)
    - [Moving companies](https://scalewithsearch.com/for/moving-companies)
    - [Pest control companies](https://scalewithsearch.com/for/pest-control-companies)
    - [Plumbing and electrical contractors](https://scalewithsearch.com/for/plumbing-and-electrical-contractors)
    - [Restoration and water or fire damage companies](https://scalewithsearch.com/for/restoration-and-water-fire-damage)
    - [Roofing companies](https://scalewithsearch.com/for/roofing-companies)
    - [Towing companies](https://scalewithsearch.com/for/towing-companies)
    - [Tree services and landscaping companies](https://scalewithsearch.com/for/tree-services-and-landscaping)
    - [Solar installers](https://scalewithsearch.com/for/solar-installation)
    - [General contractors](https://scalewithsearch.com/for/general-contractors-and-construction)
    - [Paving, concrete, and flooring contractors](https://scalewithsearch.com/for/paving)
  - Practices and professional services
    - [Bookkeeping and tax practices](https://scalewithsearch.com/for/bookkeeping-and-tax-practices)
    - [Dental practices](https://scalewithsearch.com/for/dental-practices)
    - [Family and criminal defense law firms](https://scalewithsearch.com/for/family-and-criminal-defense-law-firms)
    - [Med spas and aesthetics practices](https://scalewithsearch.com/for/med-spas-and-aesthetics)
    - [Personal injury law firms](https://scalewithsearch.com/for/personal-injury-law-firms)
    - [Veterinary clinics](https://scalewithsearch.com/for/veterinary-clinics)
    - [Gyms and fitness studios](https://scalewithsearch.com/for/fitness)
    - [Therapy and outpatient health practices](https://scalewithsearch.com/for/therapy-and-outpatient-health)
    - [Medical billing companies](https://scalewithsearch.com/for/medical-billing)
    - [Insurance agencies](https://scalewithsearch.com/for/insurance-agencies)
    - [Financial advisors](https://scalewithsearch.com/for/financial-advisors)
    - [Property management companies](https://scalewithsearch.com/for/property-management)
    - [Recruiting and staffing agencies](https://scalewithsearch.com/for/recruiting-and-staffing)
    - [Architects and interior designers](https://scalewithsearch.com/for/architects-and-interior-designers)
    - [Logistics and supply chain companies](https://scalewithsearch.com/for/logistics-and-supply-chain)
  - Agencies, MSPs, and manufacturing
    - [IT and managed service providers](https://scalewithsearch.com/for/it-and-managed-service-providers)
    - [Machine shops and precision manufacturers](https://scalewithsearch.com/for/machine-shops-and-precision-manufacturing)
    - [Marketing agencies and freelancers](https://scalewithsearch.com/for/marketing-agencies-and-freelancers)
    - [SEO agencies and consultants](https://scalewithsearch.com/for/seo-agencies-and-consultants)
    - [Small manufacturers and fabricators](https://scalewithsearch.com/for/small-manufacturers-and-fabricators)
  - Restaurants, shops, studios, and nonprofits
    - [Restaurants and hospitality businesses](https://scalewithsearch.com/for/restaurants-and-hospitality)
    - [Retail stores and ecommerce sellers](https://scalewithsearch.com/for/retail-and-ecommerce)
    - [Photographers, event planners, and travel agents](https://scalewithsearch.com/for/photographers)
    - [Churches and nonprofits](https://scalewithsearch.com/for/churches-and-nonprofits)
  - [All industries](https://scalewithsearch.com/for/)
- Learn
  - For your office
    - [Office job guides](https://scalewithsearch.com/guides/)
    - [Browser calculators](https://scalewithsearch.com/tools/)
  - Start here
    - [How it works](https://scalewithsearch.com/how-it-works)
    - [Free Starter Kit](https://scalewithsearch.com/kit/business-memory-starter-kit.zip)
    - [Synthetic specimen](https://scalewithsearch.com/specimen/working-session-specimen.zip)
  - Guides
    - [The Complete Guide to Business Memory for AI Agents](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [The Complete Small-Business Guide to AI Agent Governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [The Complete Guide to Leaving Vendor AI Memory](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - Articles by cluster
    - [Business memory](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [Agent governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [Migration and ownership](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - For machines
    - [llms.txt](https://scalewithsearch.com/llms.txt)
    - [llms-full.txt](https://scalewithsearch.com/llms-full.txt)
    - [Machine view](https://scalewithsearch.com/?view=machine)
- Company
  - Evidence
    - [Proof](https://scalewithsearch.com/proof)
  - Company
    - [About](https://scalewithsearch.com/about)

# Find out why AI lost a detail mid-conversation and restore it.

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. This page shows how to tell them apart.

## 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. It 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.

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. They are too late to count as the opening and too old to count as recent. 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. 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 |

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. Frequent restarts break the flow of the work.

## 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.

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.


## Related: AI memory

- [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/ai-context-window-myths)
- [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)
```
