Fundamentals

The Context Window

Why every chat gets slower, pricier, and more confused the longer it runs — and the handoff prompt that fixes it

Start Here

Here from the video? This is the prompt. When a chat's done its job — or it's getting long and Claude's getting vague — paste this in. Claude writes a handoff document capturing exactly where you've got to, plus a ready-made kickoff prompt for a brand-new chat, so you carry the work on without carrying the whole conversation with you.

The handoff prompt
This chat is getting long. Before we lose the thread, write me a handoff document so a fresh chat can pick up exactly where we are. Save it as HANDOFF.md (or just output it if you can't write files), and cover: - Goal — what we're ultimately trying to do - Where we've got to — what's done, what works, what's been confirmed - Current state — the key files, decisions, and anything important you're holding in context right now - Open threads — what's in progress, what's undecided, what's blocked - Next step — the very next thing to do - Gotchas — anything that bit us, or that the next chat needs to know not to repeat Keep it tight and factual — these are notes for whoever picks this up, not a report. Then, at the very end, write me a short "kickoff prompt" I can paste into a brand-new chat. It should tell that chat to read HANDOFF.md first and continue from the next step, with everything above in mind.

Then open a new chat and paste the kickoff prompt it gives you. The fresh chat reads the handoff, picks up at the next step, and you're working with a near-empty context window again — faster, cheaper, and sharper. The rest of this page is the why.

What Actually Happens When You Hit Send

Every message works the same way. Claude gets your new message, yes — but stapled to it comes the system prompt (the standing instructions it works under) and the entire chat history, every message you've sent and every reply it's given back. It re-reads all of that, every single time, and then answers.

Claude has no memory between messages — that bundle it holds in its head is the context window. Early in a chat it's mostly empty and Claude is sharp. Thirty messages in, it's juggling everything that's ever been said just to answer your latest question — and you can see how that gets confusing.

First, What's A Token?

Claude doesn't read words — it reads tokens, the little chunks it breaks text into. A token is roughly four characters, or about three-quarters of a word. Everything is measured in these: your messages, Claude's replies, the files you paste, all of it. Tokens are the unit your usage limit is counted in.

~4
characters in a token
of a word per token
~750
words in 1,000 tokens

How Big Is The Window?

The context window is the most Claude can hold in its head at once — the running total of everything in the conversation, measured in tokens. It's big. A current model like Claude Opus 4.8 holds around 1,000,000 tokens — roughly 750,000 words, a couple of novels. (The lightweight Haiku model holds 200,000.)

Big — but not free. Every message adds more to the window, and every reply has to read whatever's in it. A near-empty window is fast and cheap; a near-full one is slow and expensive. You're not paying for the size of the window — you're paying, on every turn, for how full you've let it get.

What Fills It Up

Everything in the conversation lives in the window — and it all gets re-read on every reply:

The system prompt

The standing instructions Claude works under before you even type — and your CLAUDE.md or custom instructions, if you've set them up. Loaded fresh with every single message.

Every message you've sent

The whole back-and-forth, all of it, from the first message to the last.

Every reply Claude's given

Claude's own answers count too — and they're often the longest part.

Everything you've pasted in

Files, screenshots, code, error logs, documents. A pasted file can be worth thousands of messages.

In Claude Code, the work itself

Every file it reads, every command it runs, every search result — all of it lands back in the window.

Never heard of CLAUDE.md? It's the file that turns the system prompt into something you control — the full guide is here.

A Long Chat Costs You Twice

The obvious cost is tokens. A full window means more to re-read on every reply, so each message eats more of your usage limit than the last — imagine how many tokens get burned firing the full chat history in every single time. (Claude does cache parts of the conversation to soften the blow, but a longer chat is still a more expensive one.)

The quieter cost is quality. As the window fills, Claude's attention spreads thin and the oldest instructions start getting crowded out — it drifts, forgets your rules, gets vaguer. Shorter chats don't just save your limit; they keep Claude sharper. (That's the same slide the Canary Trick is built to catch.)

How To Manage It

The fix is simple, and it's mostly one habit: don't let one chat run forever.

1

One chat, one job

Go into the chat with one aim — I want to get this done. Get it done, get out. Don't let a single conversation run all day across five different tasks; every new topic sits on top of everything before it.

2

Hand off, don't drag on

When the job's done and the work continues elsewhere, don't start over from nothing — use the handoff prompt at the top of this page. The old chat writes the notes; the new chat reads them and carries on with a clean window.

3

Keep the important stuff in a file

Your plan, your project rules, your CLAUDE.md — put them in files. Then starting fresh costs you almost nothing, because the context you care about is one quick read away, not buried in a three-hour chat.

4

Paste only what's needed

Dropping a whole repo or a giant log in "just in case" fills the window fast. Give it the file that matters, not the folder.

5

In Claude Code, clear or compact

/clear wipes the context for a clean slate, and /compact summarises the chat so far into a short brief — keeping the gist without the full weight.

The one-line version

Claude re-reads the whole chat on every reply, so a long conversation gets slower, pricier, and dumber as it goes. Use each chat for one job, hand the work on with the prompt above, and you'll spend fewer tokens and get sharper answers.