Neo-Olympia / Shield
Long sessions get compacted, laptops sleep, terminals close, and a rewrite can silently drop a lesson. Shield is the set of layers that makes sure none of that costs work.

What Goes Wrong
Each one is real. The right-hand column is what survives it.
| Threat | What happens | What survives |
|---|---|---|
| Compaction | The conversation is summarised when the context is full. Details, run IDs and paths can fall out, and of the skills only the first part of each comes back. | The always-loaded rules, project memory, everything on disk. |
| Idle compaction | A conversation of over 200K tokens that sits idle for about 54 minutes is summarised just before the cache expires, while you are away. Switched off here since 11 November. | Same as a compaction. |
| Usage limit | Not the same as the context limit. Running agents can fail. In a normal terminal a workflow pauses and carries on after the reset, as long as the reset is within a day. | Journals and files. |
| Laptop asleep | Processes pause; calls in flight fail and agents restart. | Everything. The session carries on after waking. |
| Terminal closed, Windows restart | The process and the background workflows are gone. | Journals and files; the same session comes back with claude --continue. |
| Temp cleanup | The scratchpad under Temp can disappear, scripts included. | Only what is stored outside Temp. |
| A new session | A workflow can only be resumed inside the session that started it. | The journal, which can be read by hand. |
Measured on 10 November: the lid was closed in the middle of an 11-agent run and opened again two hours later. One agent restarted and lost its first attempt; the nine that had finished stayed finished, and the run completed without help.
Seven Layers
Not every session needs all of them: short sessions need none, medium ones a brain update and three lines of status. The full set is for long or costly work, such as many-agent workflows, multi-phase builds and work that spans days.
Decisions, status, contracts and scripts live in files, never only in the conversation. The brain leads.
One file per big project: the “do now” steps on top, run IDs, exact resume commands, key paths. Kept under about 9,000 characters, because the hook's limit is 10,000.
A script that runs after every compaction and puts the right brain and card back. Described below.
A memory file plus a start-here note that points to the brain and the card. It loads in every new session in that folder.
Contracts, read scripts and workflow scripts in a folder of their own, outside Temp.
A zip of the skill, code, workflows and settings before risky steps and before every pause. Written with Python's zipfile and tested with testzip().
One command that compiles everything, parses the JSON, checks the workflows and lists what changed since the last snapshot. The answer is GREEN or RED.
The Restore Hook
A SessionStart hook with the matcher “compact”. It prints, within the 10,000-character limit, what the session has to read next. If a card is longer than fits, it continues as “part 2” with the line to start reading from, so nothing is cut off.
Tested with 154 tests and compared with 151 real session logs, plus two adversarial reviews. In the automatic compactions of 11 and 12 November nothing was lost on disk, and the start-here note in project memory did the pointing. What does go missing is what was just read and not yet used; that is read again.
Session shield, sections 2 and 3Backups And The Loss Check
A guide is rewritten only after a copy is safe, and a script then proves what happened to every line.
Before a rewrite, the old guide goes to the backup vault, kept apart from the live files.
verlies_check.py takes every non-empty line of the old file and looks for it word for word in the new files. What does not come back is listed.
Those lines are read one by one: rewritten, brought up to date, or really gone? Nothing is summarised or dropped without the owner's agreement.
On 12 November a rewrite left 53 of 324 lines that had not come back word for word. After the review 321 were accounted for, and the rest were old headings.
A rewrite, caught by the scriptReporting Changes
After any change to a guide or the toolbox, the owner gets a short report: how many lines there were before, how many are still word for word (checked by the script), and every new or changed line explained.
The incident or gap the line answers.
What the line now says or does.
What it makes easier or safer.
What would happen if the line were not there.
A big round of changes to several guides, or to the always-loaded files, also gets a page with the text before and after, a verdict per change and the evidence behind it.
Leaving And Coming Back
claude --continue brings the same session back.