This site’s version and what changed

How we refresh a session: the script

The film as a screenplay: what is seen, what is said and what is written on screen, scene by scene. Version v0.8, 11 scenes, 125 seconds, 350 words of voice.

Voice: Mistral voxtral-mini-tts-3, made by AI and labelled on screen in every frame. The picture directions are the storyboard’s.

1. HOW WE REFRESH A SESSION 0:00 to 0:13, scene component refresh-trailer

VOICE

Burning too many tokens with Claude? When a session gets long, Claude compacts it for you, and you do not choose what is lost. We compact our own sessions, on purpose. Here is the problem, our rule, and the three steps.

ON SCREEN

How we refresh a session. 1 The problem. 2 Why. 3 Our rule. 4 Step 1: write a note. 5 Step 2: start fresh. 6 Step 3: check it. 7 The result.

2. THE NUMBER 0:13 to 0:19, scene component refresh-scroll

A long scroll hangs in the dark. A light runs down it from the top, again and again, and the scroll grows a little each time. Two counters: a small one for what was written, a large one for what was re-read.

Each pass of the light is one turn. The passes get longer as the scroll grows; the large counter races ahead of the small one. Ends on both final numbers held still.

VOICE

This Claude agent wrote three quarters of a million tokens. To do it, it re-read ninety-five million.

ON SCREEN

written: 745,255 tokens. re-read: 95,247,818 tokens.

3. A LINE PER MESSAGE, A CURVE IN TOTAL 0:19 to 0:29, scene component refresh-scroll

The scroll turns on its side and becomes the floor of a chart. Each turn drops one bar, each a little taller than the last: a straight slope. The bars then stack into the area under it, and its outline is the curve.

Bars fall left to right in time with the light's passes from the first beat. The camera pulls back as the stacked total outgrows the frame.

VOICE

Every turn, a chat re-reads itself from the top. So each message costs a little more than the last. Add them up, and you get a curve.

ON SCREEN

one message: a line. all of them: a curve.

4. THE LINE NOBODY STOPS AT 0:29 to 0:39, scene component refresh-line

A gauge the width of the frame, nought to a million. A green line at 300,000. The light crosses it and keeps going. Five marks light up where real hand-overs happened, all to the right of the line.

The light does not slow at the line. The marks appear one by one, left to right, the last far across the gauge.

VOICE

Our conductors and maestros watch every session. The rule: hand over before three hundred thousand tokens. Every hand-over we can evidence came later. The latest, at eight hundred and forty-five thousand.

ON SCREEN

hand over before 300,000. 484,000. 845,000.

5. WHAT THE OLD SESSION WRITES 0:39 to 0:51, scene component refresh-shelf

A desk in the light's glow, scattered with half-made tools. The light sets three thin pages, one at a time, on a shelf at the edge of the frame. Behind it the tools on the desk lose their outlines.

Pages travel desk to shelf and turn green as they land. The desk dims; the shelf stays lit.

VOICE

So we compact on purpose. Step one: the old session writes its own summary into its repository, as plain Markdown. What happened. What is open. What to do next.

ON SCREEN

role, now, restart.

6. WHAT THE NEW ONE READS 0:51 to 1:02, scene component refresh-shelf

An empty room. One line of text is spoken into it and a new, small light appears. It goes to the shelf and reads the three pages in order. The old scroll stands rolled and dim at the edge of the frame, untouched.

The new light moves shelf page to shelf page, 1, 2, 3, and brightens a little at each. It passes the old scroll without turning.

VOICE

Step two: a conductor starts a new session with one line, pointing at the note. It loads the rules, the agent behaviour policies, its role, its state. It never opens the old transcript.

ON SCREEN

Read restart.md and continue.

7. A KEY FOR ONE SESSION 1:02 to 1:13, scene component refresh-keys

Two keys. The old one is stamped 'retired' and goes grey. The new light cuts a second key of a different shape. Sealed envelopes addressed to the old key are re-addressed to the new one; one is opened to show it works.

The stamp lands, the old key dims. Envelopes slide from one key to the other; the last one opens and glows green.

VOICE

Underneath it all: every agent has its own pair of keys, and they last for one session only. The old key is retired. The new session makes its own, and signs everything it does.

ON SCREEN

retired.

8. DID IT WORK 1:13 to 1:21, scene component refresh-keys

Two slips of paper, one from each light, each saying what comes next. They are laid side by side and match. Then a variant: one slip has a gap; a page on the shelf is corrected and the gap closes.

The slips slide together and a green line joins them. In the variant the mend happens on the shelf, not on the slip.

VOICE

Step three: check it. Does the fresh session reach the same next step as the old one? If not, a file is missing. Fix the file.

ON SCREEN

what is next.

9. THE SAVING 1:21 to 1:33, scene component refresh-saving

Two bars side by side on the gauge from the third beat. The tall one is the old session, the short one the new. A band across the foot of both is the fixed load: tools, memory, the system prompt.

The tall bar stands first; the short one rises beside it and stops early. The floor band lights last, across both, and does not move.

VOICE

One measured hand-over. Before: eight hundred and sixty thousand tokens of context. After: one hundred and nineteen thousand. Eighty-six per cent less to re-read, on every turn.

ON SCREEN

859,600. 118,600. 86% less. floor: about 75,000.

10. THE LESSON 1:33 to 1:40, scene component refresh-saving

The shelf, the small new light, and a short scroll just starting to grow. Three lines of words, one per phrase. Then the label and where the sources are.

Each phrase arrives with one object lighting: the page, the shelf, the floor band shrinking a little.

VOICE

Write it early. Keep state in files. Load only what you need.

ON SCREEN

Write it early. Keep state in files. Load only what you need.

11. THIS IS HOW WE SCALE 1:40 to 2:05, scene component refresh-cell

VOICE

Saving tokens is a side effect. The real gain is scale. This film was made by an agile cell: one person, two maestros on two accounts, a conductor, a lead agent and its helpers, on different models. The work was handed out across them, with one repository as the source of truth. When the film is done, the cell is archived, and its files stay in the library. This is how we scale.

ON SCREEN

Dinis Cruz; account C: c.maestro, conductor.c, c.productions (Fable, then Opus) with 5 scene-smiths and a critic (Fable), 5 test viewers (Gemini, GPT), 2 helper sessions (Opus), a voice (Mistral), design.c, higgsfield.c, accountant.c; account B: b.maestro, higgsfield.b, elevenlabs.b. An agile cell. The repository: the source of truth. Vaults: big files, encrypted. This is how we scale.

Data: scenes.json. The same words as plain text: script.md.