← All 96 breakdowns
CONTEXT

Why long chats make your AI agent worse (the breakdown)

From Adam Rosler. The thing you commented CONTEXT for.

What's happening

Everything you give an AI model (your chat history, the files it read, the logs you pasted) sits in one long "context". The model doesn't read it like a database. It weighs every word against every other word, and the more there is, the thinner that attention gets.

Two effects show up again and again:

  • Lost in the middle. In 2023, researchers at Stanford and UC Berkeley hid the one document with the answer among twenty. With the answer first, GPT-3.5-Turbo got 75.8% right; with it in the middle, 53.8%. That's worse than its 56.1% with no documents at all (Liu et al., "Lost in the Middle", TACL 2024).
  • Context rot. In July 2025, Chroma tested 18 models and found that performance drops as the input gets longer, "even on simple tasks" (Chroma, "Context Rot").

What I saw when I tested it (23 Nov 2026)

I made a support log of fake tickets, with lookalike names and amounts mixed in, and asked a current small model (Claude Haiku 5.5) two kinds of question.

  • Find one fact ("what refund was approved for Dana Whitfield?"): it was right 12 times out of 12, whether the ticket sat in the middle or at the end, at 65,000 and 166,000 tokens. Today's models are much better at this than 2023's.
  • Use the whole thing ("how many tickets are about the Safari bug?"): on a short log (120 tickets, ~9,000 tokens) it was right 9 times out of 9. On the long log (2,300 tickets, ~166,000 tokens) it was right 3 times out of 9. The misses: 216, 174 and 182 for real counts of 215, 181 and 184; twice it said it couldn't count that much reliably and guessed "about 525" (real: 181) and "about 575" (real: 179); once it declined to give a number.
  • Same long log, cut into ten pieces, each counted in a fresh session and added up: exact 4 times out of 6, and never off by more than one (216 for 215, 181 for 182).

So the problem isn't finding a needle any more. It's anything that needs the whole context at once: counting, comparing, "check every file", "summarise all of it". Those get worse as the context grows.

Why it matters

Agents pile up context fast: every file they open, every command output, every turn of the chat. An hour into a session your agent may be working with a long, mostly stale context, and the quality drops without warning. It won't tell you it's guessing.

What to do

  1. Put the question last. Long material first, your actual instruction at the end. Anthropic's prompting guide says queries at the end "can improve response quality by up to 30 percent in tests, especially with complex, multidocument inputs".
  2. Keep the context short.
    • Start a fresh session for a new task (in Claude Code: /clear).
    • When a session gets long, summarise and continue (in Claude Code: /compact).
    • Don't paste whole logs; paste the part that matters, or let the agent search with a tool (grep beats reading).
  3. Send big reads to sub-agents. Let a helper read the big thing in its own fresh context and report back a short answer, so your main context stays small. In my test, ten small counts beat one big one.
  4. Ask for quotes first on long documents: "quote the lines you're relying on, then answer". It makes the model find the evidence before it answers, and you can check it.

Sources

  • Liu, Lin, Hewitt, Paranjape, Bevilacqua, Petroni, Liang, "Lost in the Middle: How Language Models Use Long Contexts", TACL 2024 (arXiv 2307.03172): Table 6 and Table 1.
  • Hong, Troynikov, Huber, "Context Rot: How Increasing Input Tokens Impacts LLM Performance", Chroma, 14 July 2025.
  • Anthropic, Claude prompting best practices, "Long context prompting".
  • My test: the script and every raw answer are kept with the reel's project files (haystack.py, variants.py, raw/*.jsonl).
FREE ONE-TIME UNLOCK

Unlock the full CONTEXT breakdown

Drop your email once to read the complete step-by-step guide, grab the files, and unlock all 96 Reel breakdowns on this device forever.

✓ Instant reveal right here✓ No spam, unsubscribe any time