PTN—28
Context budgets
Show the context window as a visible budget — per-item cost, remaining headroom, and a remedy — before quality silently degrades.
Context windows are the one hard limit in every AI product, and most interfaces pretend they do not exist. The person attaches a fourth document, the composer accepts it cheerfully, and somewhere behind the UI the first document falls off a cliff — truncated, compacted, or quietly dropped. The answers get vaguer, and the person has no way to know why, because the interface presented an infinite bag and delivered a finite one. A context budget makes the limit legible: here is the capacity, here is what each attachment costs against it, here is how much room remains.
The meter has to fire before sending, not after failing. An error at submission — or worse, a degraded answer with no error at all — arrives after the person has already composed the request and formed the expectation. A visible budget while attaching lets them make the tradeoff themselves: drop the appendix, keep the contract. That is the difference between a limit and an ambush; the limit was always there, the only design decision is who discovers it and when.
Approaching the ceiling deserves a remedy, not just a warning. “Context 92% full” is a diagnosis; “this transcript is your largest item — summarize it, trim it, or split the task” is a treatment. The system knows which items are expensive and which are load-bearing, and it should spend that knowledge proposing the cheapest fix rather than leaving the person to guess which of six attachments to sacrifice.
The cardinal rule is that nothing degrades silently. If the system must compact history or truncate a file to proceed, it says so and shows what was lost — because a person who believes the AI read the whole document will trust conclusions the AI never had the evidence for. Silent truncation is not a capacity problem; it is the interface letting the person believe a falsehood about what the model saw.
Anatomy
Composer · before sending
Context budget
24.6k / 80.0k · 31%
- Conversation so far9.1k
- 4.2k
- 11.3k
- 48.6k
Nothing is trimmed silently. If it won’t fit, sending is blocked and you choose what goes.
A composer with a live budget meter, per-attachment costs, and a remedy offered before the limit bites.
- 1Budget meter. Visible while composing, before sending — the limit is disclosed where the tradeoff is still cheap to make.
- 2Per-item cost. Each attachment shows what it spends against the budget, so the expensive one is identifiable at a glance.
- 3Warning with remedy. Approaching the limit proposes a fix — trim, summarize, or split — not just a percentage.
- 4No silent truncation. Anything dropped or compacted to fit is declared, so the person always knows what the model actually saw.
When to use
- People attach documents, transcripts, or codebases large enough to approach the window.
- Long sessions accumulate history that will eventually be compacted or dropped.
- Answer quality degrades with context pressure in ways people cannot otherwise diagnose.
- Cost scales with tokens and people are paying for context they did not know they were spending.
Design considerations
- 01Denominate the budget in something people can reason about — pages, minutes of transcript, percent of capacity — with tokens available for those who want them.
- 02Show per-item cost at attach time, so the person can drop the cheap-to-lose item instead of the load-bearing one.
- 03Pair every warning with the specific remedy: name the largest item and offer to summarize, trim, or split.
- 04Declare compaction when it happens — “earlier conversation summarized to fit” — in the transcript, where the person will read it.
- 05Prefer refusing over degrading for high-stakes tasks: a clean “this won’t fit” beats an answer built on a silently amputated document.
- 06Warn at a threshold that leaves room to act; a meter that goes red on the send that breaks it disclosed nothing.
Pitfalls
- ✕Silent truncation — the interface accepts everything, feeds the model a fraction, and lets the person trust an answer about evidence the model never saw.
- ✕The token dashboard: raw counts with no denominator or remedy, legible to engineers and noise to everyone else.
- ✕Warning at the point of no return, after the person has composed the request around attachments that no longer fit.
- ✕Budget theater — a meter that renders but does not gate, so the pathological cases proceed exactly as they would have without it.
In the wild
- Claude Code
- Shows remaining context as the session grows and warns before auto-compacting, with /compact available to summarize history deliberately instead of silently.
- Cursor
- Displays a context-usage indicator for the conversation and summarizes older history as chats approach the window, keeping the pressure visible.
- NotebookLM
- Makes capacity concrete as a source count with per-source limits — a budget denominated in documents rather than tokens.