Claude Sonnet 4.6 GitHub — LLM Context Usage Tracker
You
I noticed LLM users don't have visibility into token usage, which leads to unpredictable lag. I want to design a UI concept that tracks context usage and warns users before performance degrades.
Claude
That's a sharp observation — and a real gap in current LLM interfaces. Users experience lag and degraded responses without any warning or visibility into why. Let's build a UI concept that makes context usage visible in real time, similar to a battery indicator, so users can take action before performance degrades.
You
What are the key components the UI should show?
Claude
The UI should show three core things: a visual usage bar with color-coded zones (green, yellow, orange, red), a pre-send estimate showing how much context the next message will consume, and smart warnings that trigger at defined thresholds before performance actually degrades. The goal is to give users enough signal to act before the problem occurs — not after.
You
What happens in the yellow and orange zones specifically?
Claude
In the yellow zone (40–70%) the model may begin to lose information placed in the middle of the prompt — this is known as the Lost-in-the-Middle effect. In the orange zone (70–90%) that risk increases significantly and earlier context becomes less reliable. These zones are where users should consider summarizing the conversation or starting a new one before they hit the red zone where latency and truncation become likely.
Context Usage
62%
⚠️ Moderate usage — Lost-in-the-Middle effect may begin. Consider summarizing soon.
This is a UI concept mockup. Context values are simulated.
Context Detail
0–40% Optimal
40–70% Moderate
70–90% Risk
90%+ Critical
62%
Current usage
📨 Next message estimated to add ~3% usage.
⚠️
Moderate — performance risk increasing