Context window
What fills a session's context, when Kaeonix compacts it, and the three levers that decide how far a long run gets before it does.
What fills the window
Four things share a session's context, and only one of them is the conversation:
- The system prompt — assembled every turn from your project memory, enabled skills, and the effort level.
- Tool schemas — the core tools plus anything contributed by MCP servers and plugins. A dozen chatty MCP servers cost real space before you have typed anything.
- Tool results — usually the largest share. A single wide
grepover a monorepo can outweigh the entire dialogue. - The dialogue — your messages and the model's replies.
Compaction
When a session passes 75% of the model's window, the next turn starts by compacting it into a structured summary rather than by truncating the oldest messages. Truncation loses the decision that explains the last twenty edits; a summary keeps it.
Compaction happens before the turn runs, so it is charged as part of that turn. A long run will show one visibly more expensive turn each time the window fills — that is the summary being written, not a stall.
Keeping it small
Three levers, in the order they usually pay off:
- Delegate the reading. A subagent gets its own window and returns a summary, so the parent receives the conclusion and none of the file dumps.
- Keep project memory short.
CLAUDE.mdis prepended to every request; a long one is a tax on every turn, forever. - Prune the tool surface. Every connected MCP server spends context on schemas whether or not the agent calls it.
Check where a session actually stands: