Insights·2026-08-24

A million-token window is open — so why should you not fill it?

The last agent anti-pattern on Anthropic's certification exam is letting context grow unbounded. Context is tokens and tokens are money, but the more important reason is different: the more context there is, the more confused the model gets and the less accurate the answer. Two remedies. Split work that produces a lot of output into a separate context and take back only the summary, and compact the conversation when it grows — the threshold in the talk's code was 150,000 tokens. Alongside come the rules about not calling agents interactively in CI, and halving cost with the Batch API.

100만 토큰 창이 열려도 넣을 것은 제한한다 — 명령과 단계를 담은 요약 도식

What context is

First the term. A prompt is the one line you just typed. Context is everything that rides along with that line when it reaches the model.

That includes the system prompt, instruction files like CLAUDE.md, skills, the entire conversation so far, and whatever the tools returned. Your prompt is only the last line of that bundle.

So context grows as the conversation lengthens. Whatever went in follows along until the conversation ends. Paste in 500 lines of logs and those 500 lines ride along with the next question, and the one after that.

Models advertising million-token windows have created the impression that none of this matters any more. That impression is exactly what this anti-pattern targets.

Why be frugal — two reasons, and the second matters more

The first is simple. Context is tokens and tokens are money. The longer the conversation, the more the same content is re-sent with every request, and the cost accumulates.

The second matters more: the more context there is, the more confused the model gets and the less accurate the answer.

That sounds backwards. Surely more information means better answers. In practice, irrelevant information shaves relative weight off the relevant kind. It is the same place as why you should not pile everything into one CLAUDE.md.

So the conclusion runs this way. It is easy to think a million-token window means you can put everything in. The opposite holds: limiting what goes in is what makes it accurate.

Remedy one — split long output into a separate context

Some work produces a lot of output. Scanning all the logs for errors, sweeping a large file to count a pattern.

Do that in the main conversation and thousands of log lines pile into the context — when what you actually needed was a five-line summary saying there are three kinds of error and here is each.

So you split that work into a separate context. The talk calls it a fork. In that branch the agent reads all the logs, thinks, and organises, and only the summary comes back to the main conversation. The verbose output stays in the branch and disappears with it.

In Claude Code you do this with subagents — the same tool as the "split the agent" advice from the previous post, except this time the reason is output volume rather than tool count.

There is a version for people who do not write code. When a task requires pasting in a pile of material, do not do it in your current conversation — open a new one. Take the summary from there back to the original.

Remedy two — compact when it grows

Even with splitting, the conversation itself keeps growing. Hence the second remedy: compaction.

The code in the talk counts tokens each loop and runs a compaction past a threshold. The threshold there was 150,000 tokens. Compaction swaps the conversation so far for a summary — details discarded, decisions and state kept.

Claude Code has this as the /compact command. It fires automatically too, but you can type it yourself the moment the conversation starts to wander.

If you do not write code, do the same thing by hand. Ask for "a five-line summary of what we have decided so far," then paste those five lines at the top of a new conversation. Do not spend effort holding on — write it down and carry it over.

What comes with it — do not call the agent interactively in CI

The last scenario is running inside a pipeline, and the anti-pattern here is a little funny.

Call the agent in conversational mode and it stops at a permission prompt asking "may I do this?" But there is nobody in a pipeline to answer. It stands there waiting for an answer that will never come.

So you run it non-interactively and take the output as JSON so the pipeline can read it. In Claude Code, `claude -p` is that place.

One more thing comes with it: the Batch API. Bundle prompts and work into a batch and the token cost is halved, with results within 24 hours. If the answer is not needed right now, that is the right place for it — hand it over at night and collect in the morning.

The one thing running through all five

That completes the five anti-patterns from Anthropic's certification exam.

Do not use the response directly; look first at why it stopped. Do not pile rules into one file; put them where they apply. Do not attach every tool; split the agent. Isolate long output and compact when it grows. Do not call the agent interactively inside CI.

One thing runs through all five: every answer gives less. Fewer tools, less context, less information.

Handling agents well gets talked about as the ability to attach more, and this exam picked the opposite — knowing what not to give.

One thing to try today

Think of the longest AI conversation you currently have open. If the answers have gone hazier than they were at the start, context is already in the way.

Type into it: "give me a five-line summary of what we have decided so far." Copy those five lines, paste them at the top of a new conversation, and continue there. That is remedy two, done by hand.

And the next time you need to paste in logs or a long document, open a new window instead of using the current conversation. That is remedy one.