Technical report · TR-2026-08-29

Context tokens sent to the model, with and without Hexum

Last updated 29 August 2026 · Estimator ceil(utf8_bytes / 4) · Not a provider invoice

Figure 1

Published card

Click a suite. Arrow keys once the plot is focused. Grey = without Hexum. Pink = with Hexum. Example turn is tiny on a linear axis next to Combined — use Log.

Combined 220,393 → 27,352 · 87.6%
Fig. 1. Tokens sent to the model, Study I. Combined 220,393 → 27,352 (cut 87.6%). Measured, not rounded up.
Pass
220,39327,35287.6%24 / 24
18,2003,10083.0%n/a
132,80714,37989.2%12 / 12
87,58612,97385.2%12 / 12

Study I

MBPP and HumanEval

Model on the card: GPT-5.6 Sol at $4 / 1M input. Unit tests passing. Method: methodology. Table: results.csv.

Without HexumCombined · GPT-5.6 Sol
Context tokens220,393
Input rate$4.00 / 1M
$0.88 model input for this run
With Hexum24 / 24 pass
Context tokens27,352
Input not sent193,041
$0.11 cut 87.6%

24-task card. 193,041 tokens not sent. $0.88 → $0.11 at $4 / 1M input.

Study II

LedgerKit · five scenarios

Independent 43-file Python billing service (32,768 tokens on disk). Same virtualize_context engine as the card. Not a re-run of MBPP. Raw ledger: ledgerkit.csv.

Where is overage calculated, who calls it, what breaks if the free-tier cap moves?

Default inspect 32,768 → 3,220 (90.2%). Hot file stays almost full: 1,276 → 1,242. Budget 3,000 is a second measured point (92.9%), not an interpolation.

vs dump
32,768 → 3,220 90.2%
vs focused
32,768 → 3,220 90.2%
edit bandwidth
— → —
S1 budget 3k
32,768 → 2,331 92.9%
S1 dump 32,768 → 3,220 · 90.2%
This scenario only. Every row here was measured.

Dump analog in the 89–93% band. This is the published “up to 90%” regime.

Figure 3

Cut matrix

Pink fill scales with cut. “loses” still has a bar in Fig. 1 (Hexum taller than the focused read). S1 splice is blank because that scenario never spliced — there is no missing file.

Scenario vs dump vs focused edit budget / after

Figure 4

When 90% shows up

0%greenfielddump analog90%

The 80–93% band is dump-vs-shrink or splice-vs-file. Left of that is authoring and “I already know the four files.” Click a tick to load that row in Fig. 1.

Figure 5

Scale Study I combined

10,000 × 24-task suites · 220,393 vs 27,352 tokens each

$7,722 saved without Hexum $8,816 · with Hexum $1,094

Protocol

ItemStudy IStudy II
What is countedTokens sent to the modelSame estimator on dump vs shrink / expand / splice
Estimatorceil(utf8_bytes / 4)ceil(utf8_bytes / 4)
n24 tasks (12 + 12)5 scenarios × 2 sides on one 43-file seed
ModelGPT-5.6 SolEngine only (no LLM in the token count)
Pass24 / 24 official testsPlanted overage test for S2/S5
Not countedThought tokens, SLOC, disk KB, provider invoices, skill dialect

Output-token savings from the skill are not a published study. Tiny prompts may save little. Hosted MCP rejects more than 64 files and currently forces since_hash to none. Full write-up: methodology.

FAQ

How does Hexum reduce tokens?

The agent calls hexum_shrink before it reads widely. The model is sent this turn, not the repository. On MBPP, measured context dropped about 85% with the same tests passing. Example turn: 18.2k → 3.1k tokens, 41 files → 6. See /benchmarks and /methodology.

Did the tests still pass?

Yes on the published card: 12 / 12 MBPP and 12 / 12 HumanEval. LedgerKit S2/S5 is a planted overage assertion; the splice restores extra == 0 at the free-tier cap.

Is that a cloud invoice?

No. Tokens sent to the model, estimated as ceil(utf8_bytes / 4). Output-token savings from the skill are not a published study.

When is the cut not ~85%?

Greenfield authoring (S4) is 0%: new source cannot be shrunk. A focused agent that already opens four files can still beat a whole-repo shrink (S3). Dump-vs-shrink on LedgerKit inspect is 90.2% by default, 92.9% with a 3,000-token budget.

What is tokens saved?

Tokens in minus tokens out, when that is positive. Stripe is billed on tokens saved. Calls that do not save tokens still increment calls and the in/out counters.