Back to BoringToolsKit · All tools · MCP and API
Method · published 22 November 2026

We tested a "tiny internal clock" for language models. With the data visible it did nothing. With the context compacted it was the only arm left standing.

A posted experiment claimed that giving a language model a small written counter, which it reads and updates as it works, lifted long-context state tracking from about 30% to about 95%. We ran it across sixty graded trials in two conditions. With the whole ledger in front of the model the counter made no measurable difference, and the effect we first thought we had seen was noise. With the middle of the conversation compacted away and the numbers dropped from the summary, the arm with the counter answered 10/10 on the final balance and the arm without it answered 0/10. The technique was never useless. It was aimed at a condition nobody had tested, including us.

What was claimed

The claim, as posted: long documents make a model lose track of where it is, so the author gave one a "tiny internal clock", it "reads the count and writes it back in", and tracking went from roughly 30% to roughly 95%. No model was named and no protocol was published. That makes it a lead worth testing rather than a result worth citing.

The idea is not fringe. Manus describes rewriting a task list so the objectives are "recited into the end of the context", and a 2026 working-memory probe of cumulative state tracking reports 31.7% accuracy on its core items, rising to 88.0% when the model is instructed to write its steps. So there is a real family of results about written intermediate state. The question is whether the effect survives contact with a task you can grade.

The test

One task, two prompt arms, exact-match grading against numbers computed in code. A ledger of 80 operations applied in order to a starting balance of 1,000, each operation a signed number. The model answers three questions as JSON: the final balance, the balance immediately after operation 40, and how many operations had a positive delta. A near miss counts as a miss, so guessing does not score.

Both arms see identical data and an identical answer format. The only difference is the clock.

Results

LaneBaselineWith clockNotes
Gemini 4 Neon, low effort9/99/9three orderings, nine graded answers per arm
Gemini 3.8 Flash, low effort24/30 (80%)21/30 (70%)ten orderings, thirty per arm
Gemini 3.8 Flash, medium effort30/30 (100%)30/30 (100%)ten orderings, thirty per arm

Pooled across the cheap lanes, the baseline scored 54/60 (90%) and the clock arm 51/60 (85%) with a Fisher exact p of 0.58. That is not a small improvement nobody could detect. It is no effect, with the point estimate slightly favouring the plain prompt.

With the ledger in front of the model, the clock cost tokens and bought nothing. The frontier lane scored perfectly with and without it, and the cheap lane scored lower with it, though not by enough to call a real penalty. Anyone quoting a single "30% to 95%" figure should be asked which arm of which table it came from.

The second test: compaction

The first test could not fail the way the technique predicts, because every number stayed on screen and a model could always re-read the ledger instead of trusting its own total. The setting the technique is aimed at is the opposite: a long agent run where the middle of the conversation has been compressed to a summary. So we ran the same task under compaction.

Eighty operations, delivered in four blocks of twenty. After each of the first three blocks the transcript is replaced by a summary of at most thirty words, and the summarizer is instructed to drop all numbers. Both arms are told to end every reply with one line, CLOCK: balance=<n> positives=<m>. The only difference is what happens to that line: in one arm it is summarized along with everything else, and in the other it is carried into the next prompt verbatim.

QuestionSummary onlyState line protected
Final balance0/1010/10
Count of positive deltas2/1010/10
Balance after operation 400/100/10

Fisher exact p was 0.00001 for the final balance and 0.0007 for the positive count. Twenty trials, two lanes, ten per arm. Whole trials: 2/30 (7%) against 20/30 (67%). This is the largest difference in either experiment and it runs in the direction the posted claim predicted.

One row fails in both arms, and it is the informative one. The balance after operation 40 is unrecoverable for both because the protected line is overwritten each block; it holds the current total and not the history. A state line that carries only "where I am now" cannot answer "where I was", so a checkpoint question is lost even with the technique applied. That is a property of the design we tested, and the fix is to carry a short list of checkpoints rather than one number.

Two things worth recording about the failures. The protected line was correct in 40 of 40 of the lines written, so the failure mode is not arithmetic drift in the counter; it is losing the counter entirely. And when the summary-only arm had nothing to work from, it did not say so. It returned a complete JSON object with invented values. A model without carried state does not abstain, it produces a confident wrong number.

The comparison also has a boundary, and we ran it. Repeating the same compaction while telling the summarizer to preserve numbers gives 29/30 (97%) for the summary-only arm and 28/30 (93%) for the protected one, a difference of nothing. Protection only earns its keep when the compaction is lossy. If your compaction already carries the totals, a second copy buys you nothing.

The pilot that fooled us

Before the scaled run, the same task on the same model produced 3/6 for the baseline and 6/6 with the clock, across two orderings. That reads as a large improvement and it is exactly the kind of number that becomes a blog post. With ten orderings the direction reversed.

Two things were wrong with the pilot, and both are ordinary. The sample was tiny, and the task is stochastic across orderings: some shuffles put the operations in a sequence where the arithmetic is easy to drift on, and others do not. Two draws happened to place the baseline in a hard ordering and the clock arm in easier ones. The scaled run also showed both arms failing on the same orderings, which is a property of the sequence rather than of the prompt.

This is the whole reason the page exists. A result that small, published without the scaled run, would have been a confident claim backed by noise, and to any reader it would have been indistinguishable from a real finding.

What the failures look like

On the orderings where the model did fail with the ledger visible, it did not refuse or hedge. It returned a final balance 148 too low, an intermediate balance 248 too high, and a positive count off by one, in one clean JSON object. The arithmetic drifted and the format held. That matters for anyone building on these models: a wrong total looks exactly like a right one.

Under compaction the failure is different and worse. With the state gone from the transcript, the model supplied numbers anyway, in the correct shape, with nothing behind them. There is no visible difference between that object and a correct one.

What this shows, and what it does not

It shows that the technique is real in the condition it was designed for. When the transcript has been compacted and the summary has dropped the numbers, a protected state line was the difference between answering and inventing, 10/10 against 0/10 on the final balance, p of 0.00001. It also shows the technique does nothing when the source data is still in context, which is where a lot of published advice about prompts gets tested and where it will look useless.

It does not show that a model should keep its own counter as the source of truth. Every line here was checkable against numbers computed in code, and that is the only reason we can say the counter was exact in 40 of 40 cases. In production nothing grades the counter, so an error in it is carried forward and looks authoritative. The result is an argument for computed state that survives compaction, not for trusting a model's arithmetic.

Limits, stated plainly. Twenty trials per comparison, two models, one task family, one summarizer from the same model family. The task is arithmetic with an exact answer, so it does not tell you how a state line behaves on prose. The checkpoint row shows the design we tested loses history, so a longer run would need a list rather than a single line. And a model that invents numbers when starved of state may behave differently on a task where plausible wrong answers are less easy to produce.

What we would ship instead

Where a wrong number can reach a reader, do not let the model keep the count. Compute the counter from state in the harness, write it into the context in a form the compactor cannot touch, and let the model only read it. That gives you three things a self-written clock does not: the number is exact by construction, it survives compaction, and it is auditable after the fact. Carry a short history of checkpoints too, since a single current total cannot answer a question about the past.

If you are writing your own agent loop, the practical version is one line in the harness, not one line in the prompt: keep the running state outside the transcript, re-inject it after every compaction, and never let the model's recollection of a number be the only copy. That is the same discipline behind every calculator on this site, where the answer comes from a formula and a check rather than from a model's impression of the arithmetic.

Reproduce it

Both protocols are small enough to re-run in an afternoon. Experiment one: a ledger generated from a seed, three questions with program-computed answers, two prompts that differ only by the clock instruction, exact-match grading, the same seeds across models. Experiment two adds a compaction step between blocks, a fixed summarizer for both arms, and one rule about whether the state line is protected. Our recommendation to anyone reading a claim like this one: run ten orderings, not two, grade in code, and test the condition the technique was designed for rather than the condition that is convenient.

Protocol, prompts and per-trial results: sixty trials recorded 22 November 2026, graded against harness-computed answers. Cited prior work: "Lost in the Middle: How Language Models Use Long Contexts" (2024); a working-memory-inspired probe of cumulative state tracking (2026); Manus, "Context Engineering for AI Agents" (2025). BoringToolsKit publishes the checks it runs on its own numbers at what we can prove.