Comment by fulafel

2 hours ago

128k tokens is about 12-20k lines of code/prompt right? Or more than an average novel. And you don't need all the source code or entire files in the context after all.

I wonder what the approximate context window of a human programmer is... less than 12k lines I'm sure.

It is common for the agent tools, MCP tool, skills, project context and system prompt to take between 5k and 25k tokens. This depends heavily on your agent and tool setup.

But that's before the prompt.

Then after the prompt, every tool call the agent makes adds to the context. Longer turns can easily consume 50k-100k tokens between the agent and various tool calls (reading the filesystem, reading files, reading compiler output, reading memories).

Then each "turn" with the agent stays in context and is fed into the next turn. Two or three turns and you're up near 250k.

Tokens are also occupied by the internal reuslts of 'thinking', for instance, using the latest opencode, give qwen 3.8-flash-next with 'high' thinking mode 50KB total of python to read in six different files, count the expected tokens you'd expect it to occupy in just the size of the python. Then count the actual token count taken up after it's finished thinking about the contents of the python and analyzing it before you give it a single directive.