Context Gauge
See what the model still holds — before it forgets
Chat shows an infinite scrollback while the model sees a sliding window — old turns silently fall out mid-session, and the user only notices when the assistant contradicts something it knew an hour ago. Context Gauge renders the window as an instrument: how full it is, which sources occupy it (files, conversation, memory, system), what has already been evicted, a warning before compaction — and pins for what must survive.
Framing
The problem
The model silently forgets — old turns fall out of the window mid-session, and the user only notices when the assistant contradicts something it knew an hour ago.
The pattern
Render the context window as a live gauge: fill level, per-source segments, eviction markers, a compaction warning, and pins for what must stay.
Why chat breaks here
Chat presents an infinite scrollback while the model sees a sliding window — the interface actively misrepresents what the AI is working from.
Risks
A raw token-accounting dashboard becomes noise — the gauge earns its place by showing consequences (what left, what stays), not numbers.
Avoid when
Short, single-shot interactions that never approach the window limit.
Use when
Sessions run long enough that context loss changes answers, and users need to see — and steer — what the model still holds.
DOPE evaluation
- Directability
- Pin what must survive, evict what should not be there — the user curates the window instead of hoping
- Observability
- A live gauge shows how full the window is and which sources — files, turns, memory — occupy it
- Predictability
- Compaction announces itself before it happens instead of silently dropping the oldest turns
- Explainability
- When the model forgets, the eviction marker says what left the window and when
In the wild
- Claude Code · Context meter + auto-compact warning (Anthropic) — A live indicator shows remaining context and warns before auto-compaction summarizes older turns — fill level, consequence, and advance notice in one strip.
- Cursor · Context window indicator (Cursor) — Shows how much of the model window the current conversation and attached files consume, and which files are in context — per-source visibility of the window.
- Google AI Studio · Token count (Google) — A persistent token counter against the model maximum as you compose — the raw fill-level reading, without eviction markers or pins.
FAQ
When should I use the Context Gauge pattern?
Sessions run long enough that context loss changes answers, and users need to see — and steer — what the model still holds.
When should I avoid the Context Gauge pattern?
Short, single-shot interactions that never approach the window limit.
What problem does Context Gauge solve?
The model silently forgets — old turns fall out of the window mid-session, and the user only notices when the assistant contradicts something it knew an hour ago.
Why is chat the wrong fit for this?
Chat presents an infinite scrollback while the model sees a sliding window — the interface actively misrepresents what the AI is working from.
Related patterns
- Often paired with: AI Memory — Durable memory across sessions + a live gauge of the window inside one.
- Often paired with: Compute Budget — Both meter a finite run resource — spend on one axis, attention span on the other.
- Alternative to: Knowledge Source Toggle — Choosing which sources may enter vs seeing what currently occupies the window.