Labs · Context lens
Your AI didn’t forget.
The context window dropped that message.
Every turn, the whole conversation is re-sent to the model — until it stops fitting. Drag the window slider and watch turn 3, where you said your name, physically fall out of the request. Then flip on compaction to see what a pinned summary rescues, and prefix caching to see what the re-sending actually costs.
window · 8k
At turn 300, the model can only see the last 35 turns
Each cell = one turn. Colored = visible to the model; gray = slid out; purple ring = covered by the summary; ★ = a turn that planted a key fact
Fixed head uses the demo budget of 1,500 tokens (system+card 900 · worldbook 600) — your real number depends on your card and lorebook.
Facts sliding out of the window
- #3You introduced yourself: Shen Yue, from the ferry town down southout of window — invisible to the model
- #18Baizhi admitted she fears thunder — an old story about a leaking atticout of window — invisible to the model
- #42You two agreed to see the lantern fair on the spring equinoxout of window — invisible to the model
- #71You mentioned carrying a brass whistle your mother left youout of window — invisible to the model
- #108The inn owes the west-side rice merchant thirty taelsout of window — invisible to the model
- #150You promised to fix the waterwheel in the back yardout of window — invisible to the model
- #199Baizhi's younger sister Baikou studies medicine in the next cityout of window — invisible to the model
- #242You found a limping tabby on the hill and named it Ashout of window — invisible to the model
Under plain truncation these turns simply vanish — the model acts like they never happened. A summary is lossy: the gist comes back, the exact words don't.
Foreverse ships this exact semantics: pinned-seam summaries, originals untouched, cache prefix unbroken.
Chat past turn 500 in the appWhat actually happens when the context window fills up?
Nothing dramatic — the oldest turns simply stop being sent. The model never sees them again, which reads as “forgetting” from your side of the screen. Drag the window slider above (8k / 32k / 128k) and watch exactly which turns fall off a 300-turn chat; then flip on compaction to see what a pinned summary rescues from the dropped prefix, and prefix caching to see what the resending costs at real prices.
Where this tool comes from
The window-filling model mirrors how tavern-family frontends assemble a request: fixed head (system prompt + card + worldbook) first, then history packed newest-first with a small per-message overhead, with room reserved for the reply. The compaction semantics follow the auto-compaction layer we shipped in the app: a summary covers the prefix [0, J), the seam stays pinned between compactions, originals on disk are never rewritten. Its recall numbers (59% vs 24% over the compressed zone) come from our 7-config × 98-probe benchmark on a 530k-token corpus, 2026-07.
Cache pricing uses DeepSeek V4 Flash public list prices ($0.14/M input, $0.0028/M cache read — 2% of full). The three hit-rate presets are measured, not invented: 91.5% bare SillyTavern, 46.5% our pre-fix layout, 89.9% after the fix, all from the same instrumented four-way benchmark.
What it can't do
Tokens here are estimates (character-ratio, not a real tokenizer), and the fixed head is a demo-sized 1,500 tokens — your real numbers depend on your card, worldbook and frontend. Different frontends also order the head differently.
The compaction toggle demonstrates strategy behavior, not guaranteed outcomes — what a summary rescues varies with the conversation. Our benchmark numbers are single-model engineering observations, labeled as such.
The cost chart is input-side only and assumes the per-turn hit rate you picked; real hit rates depend on how your client arranges the prompt — that's the whole point of the 46.5% preset.
FAQ
So why does the AI forget things from earlier in the chat?
Because every request re-sends the conversation from scratch, and the model only accepts a fixed budget of tokens. Once the system prompt, card and worldbook take their share, history fills whatever's left — newest first. Turn 12 where you said your name isn't "forgotten" so much as physically absent from the request. The grid on this page shows exactly which turns made the cut.
Does a bigger context window fix it?
It delays it and bills you for the delay. A 128k window holds a lot of turns, but you pay input price on the whole window every single turn — that's the rising line in the cost chart. And attention quality degrades over very long contexts, so "it's in the window" doesn't guarantee "it gets used". Compaction plus caching is the cheaper answer for chats that run hundreds of turns.
What exactly does the compaction summary rescue?
The gist, not the words. In our compaction benchmark (7 configs × 98 probes on a 530k-token corpus), a structured summary lifted recall over the compressed zone from 24% (plain truncation) to 59% — and the single biggest factor was whether the summary kept concrete values like names and numbers. Exact quotes and fine detail don't survive; that's why the app never rewrites the original transcript on disk.
Where do the 91.5% / 89.9% / 46.5% hit rates come from?
From an instrumented benchmark we ran in 2026-07: same model, same key, byte-identical message scripts, every call metered through one gateway. Bare SillyTavern's default layout hit 91.5%; our own app hit only 46.5% because a lore-injection spot drifted every turn — we published the failure, fixed it, and re-measured at 89.9%. The full report is linked in the methods section.