Snapcompact: SoTA compaction — instant, local, free. Pick 3 — Stencil
A 1568×1568 PNG fits about 40,000 characters of text in a 6×10 pixel font. That's ~10,000 tokens worth of text, billed by Anthropic's pixel formula as 3,279 image tokens. You see where this is going?<br>Snapcompact : when the context window fills up, render it into dense pixel-font bitmaps and hand those back as images. "A picture is worth a thousand words" turns out to be quite literally true — the model reads it back near-verbatim, at a third of the input price. Obligatory benchmark:<br>3,279image tokens per 40k chars<br>÷3input price, same context<br>÷2.0frontier bill at F1 parity<br>0.39→1.00p(answer) after tuning
CONTEXT CARRIED170K TOKENS→46K(÷3.7)<br>FULL RUN, TOTAL $ — TEXT → SNAPCOMPACT · LOG SCALESAME CORPUS · SAME QUESTIONS · F1 PARITY<br>Claude Fable 5÷2.0<br>Claude Opus 4.8÷2.0<br>GPT-5.5÷1.8<br>Gemini 3.5 Flash÷2.9<br>3¢10¢30¢$1$3
Claude Fable 5$10 IN / $50 OUT PER M$3.31 → $1.67 · ÷2.0 AT F1 PARITY<br>plain textF1 1.000.47 +0.14 = 0.61¢
snapcompact6×12 dimF1 1.000.13 +0.35 = 0.48¢
handoffF1 .500.61 +0.88 = 1.48¢
compactF1 .35ABSTAINS 55%0.55 +0.56 = 1.10¢
← CARRYDECODE →
Claude Opus 4.8$15 IN / $75 OUT PER M$4.95 → $2.48 · ÷2.0 AT F1 PARITY<br>plain textF1 .800.70 +0.077 = 0.78¢
snapcompactdoc-8on16 bwF1 .800.26 +0.075 = 0.33¢
handoffF1 .15ABSTAINS 72%0.80 +0.40 = 1.19¢
compactF1 .00ABSTAINS 75%0.75 +0.17 = 0.92¢
← CARRYDECODE →
GPT-5.5$2 IN / $16 OUT PER M$0.34 → $0.19 · ÷1.8 −12PT F1<br>plain textF1 .780.084 +0.26 = $0.34
snapcompact6×6u sent · 12 imgsF1 .660.070 +0.12 = $0.19
handoffF1 .460.17 +0.93 = $1.10
compact (remote)F1 .540.31 +1.18 = $1.49
← CARRYDECODE →
Gemini 3.5 Flash$0.6 IN / $4 OUT PER M$0.11 → $0.04 · ÷2.9 −6PT F1<br>plain textF1 .960.018 +0.059 = 0.077¢
snapcompactdoc-8on16 sent dimF1 .900.004 +0.064 = 0.068¢
handoffF1 .710.033 +0.15 = 0.19¢
compactF1 .00ABSTAINS 100%0.016 +0.026 = 0.043¢
← CARRYDECODE →
carry — context sent as input, every turn decode — tokens written back hidden reasoning share of decode<br>Bars are cents per question from the tuned runs at the longest context (~170k chars) — GPT-5.5's are full-run dollars; the badge is the full-benchmark bill at F1 parity. Handoff and compact write a prose summary first. GPT-5.5's "compact" is OpenAI's server-side compaction.<br>All four frontiers take the deal.
The four frontier models the renderer was tuned against, never blended · GPT-5.5's<br>billing is flat ~2.9k tokens per image at any density, so the densest readable font<br>wins — and its remote compact, the best summary anywhere, fades from .90 on a<br>tenth-size corpus to .54 here<br>This started as a joke ("free token glitch lol"). Then we benchmarked it, identified where it went wrong, cracked open Qwen's attention layer, fixed the issues, and benchmarked it again — and it generalized so well to frontier models that it earned this write-up.<br>The Case Against Compaction<br>We've never been big fans of compaction. In every single harness, including the open-source one we contribute to, it "cripples" the model to the point where you would have been better off with a completely new session.<br>Eliding tool results is an okay alternative — instant, deterministic — but sometimes not really sufficient. It also occasionally confuses the model about tool calling. LLMs complete stories; if half of your story is [elided...], how confident do you think it will be about using them?<br>Handoffs are as good as it gets — but unlike a plan, you don't usually steer the handoffs, and when you don't, agents waste precious context writing an unnecessarily detailed diary, followed by a TODO list that practically begs the next agent to declare the goal impossible and ship an "MVP" instead.<br>For a long time our position was that if you need compaction often, you're doing something wrong: the plan either has scope creep, or should have been explicitly orchestrated via subagents so that the main agent could stay responsible for the entire scope.<br>However, spoiled by the 1M context window, sessions these days routinely cross the 500k mark — a mortal sin by that logic. Long-horizon tasks simply do better when one coherent agent drives the plan uninterrupted, and that easily reaches those levels even with aggressive delegation.<br>Fine. So compaction stays. But if we have to compact, it's going to lose nothing.<br>A Stupid Experiment<br>It began with a 328KB session log and a simple question: what if we just printed this thing out and started the session with it?<br>Attempt one was maximally greedy: Tom Thumb, a 3×5 pixel font, 122,696 characters in a single image.<br>We sent it to a fresh agent session, zero explanation, and got back:
The image appears to be pure noise with random pixels, which suggests it might be corrupted or a file that's been misnamed as PNG.
Fair. Attempt two used the X11 6x10 font (glyphs actually designed for that cell size), 40,716 characters, with each text row cycling through six colors. Same model, and there it was:
It identified the session's topic...