[ DOCUMENTATION / GLITCH AGENT / CONTEXT MANAGEMENT ]
CONTEXT MANAGEMENT
Every model has a finite context window — the total number of tokens it can hold in mind at once. Glitch shows you that window in the chat and how much of it the current conversation is consuming.
// THE CONTEXT WINDOW READING
The reading in the chat tracks your context use against the limit of the LLM you currently have selected. It counts every token in the conversation — your messages, the agent's replies, tool calls, and the results of those tool calls — and shows that count as a fraction of the model's total window.
The number updates after each turn, so you can watch a conversation fill the window in real time and decide when to wrap up before quality starts to slip.
// WHY THE METER STARTS ABOVE ZERO
You will likely see a non-zero reading right after your very first message in a fresh conversation — often 8–10%. That is not a bug. Glitch Agent pre-pends a block of context and instructions to the model before your message: how to read and edit your projects, the tools available to it, the capabilities it has, and the conventions it should follow. That preamble counts toward the window like any other tokens.
// WHY HIGH USAGE HURTS
The higher the context usage climbs, the less reliable the model becomes. It is more likely to lose track of earlier instructions, confuse details across turns, repeat itself, or hallucinate. Long, dense conversations are the most affected — a model that was sharp at 15% usage can start drifting noticeably past 70%.
Keep an eye on the reading and start a fresh conversation — or use /clear — when it climbs high. New conversations are cheap; degraded answers are not. Most users get the best results by starting a new chat for each meaningfully different task instead of letting one thread run all day.