~/VibeHandbook
$39

Chapter 08 · 08

Manage Context Like a Resource

A long conversation is not free. As a thread grows, earlier instructions get buried, the model leans harder on recent messages, and details you stated twenty turns ago quietly stop mattering. Picture the as a fixed-size box: as the conversation grows it fills up, and your earliest instructions get pushed toward the bottom where the model pays them the least attention:

   early turn                 long conversation
   ┌──────────────┐           ┌──────────────┐
   │ SPEC (clear) │           │ chatter      │ ◀ recent (heeded)
   │              │           │ chatter      │
   │              │           │ fix attempt  │
   │              │           │ old code v3  │
   │              │   ───▶     │ old code v2  │
   │              │           ├──────────────┤
   │              │           │ SPEC (buried)│ ◀ ignored
   └──────────────┘           └──────────────┘
                              │ XXXXXXXXXXXX │ ◀ pushed out
                              └──────────────┘

Treat the context window as a working surface you are responsible for keeping clean, not an infinite memory.

A few habits help:

  • Restate the spec when you pivot. Do not assume a requirement from ten messages back still holds. Summarize the current target in one short paragraph and let the AI work from that.
  • Start fresh for a new problem. When you switch from the auth code to a CSS (Cascading Style Sheets — the language that controls how a page looks) bug, open a new conversation. Dragging unrelated context along makes the model worse, not better.
  • Paste the current code, not the history. If a function has changed five times, the AI does not need the five old versions — it needs the one that exists now. Give it the present state and the next change.
  • Keep a short source of truth outside the chat. For a longer task, a few lines in a file ("stack, key decisions, what's done, what's next") let you re-seed a fresh conversation in seconds instead of reconstructing it from a scroll-back.

The goal is the same one running through this whole chapter: at every moment, the AI should be working from an accurate, compact picture of the task — not a sprawling transcript it has to guess its way through.

Want it offline?

Get the PDF + EPUB + downloadable prompt library + version updates.

$ Get the PDF — $39