DEV Community
•
2026-04-11 09:07
Two Ends of the Token Budget: Caveman and Tool Search
Every Claude Code session has a single budget: the context window. Two hundred thousand tokens, give or take, that have to hold the system prompt, the tool definitions, the conversation history, the user's input, the model's output, and (if extended thinking is on) the chain of thought. There is exactly one pile, and everything gets withdrawn from it.
The pile has two openings. Tokens flow in fro...