Tools · Keep the context
Continuity
Why we made itCodex compaction squeezes a notebook of thinking into a few sentences. The agent can wake up lost, and it looks like it just stopped.
Protects a Codex agent’s notebook from compaction, so when it wakes up it can open the notebook and pick up where it left off.
The agent's notebook survives compaction
When a coding session gets too long, the tool squeezes the older part of the conversation into a summary so the work can keep going. That's called compaction. Afterwards the agent still knows the subject, but it can lose the job: which worker is already running, what has already passed, and what the next step was.
Continuity keeps the agent's working notebook outside the conversation, where compaction can't touch it, and points the agent back to it.
- Before compaction: a small script seals a pointer to the right notebook.
- During compaction: the summary is written as a handoff, not a diary: the real goal, what's done, what's running, what's next, and what must never be launched twice.
- After compaction: a short message tells the agent to reopen its notebook, check what's actually saved, and never start a duplicate worker.
- It keeps the job, not the transcript. It's built not to copy the conversation, private reasoning or anything that looks like a secret, and tests check that.
Before compaction
A small script seals a pointer to the agent’s notebook.
Compaction
The conversation is squeezed into a short summary.
After
The agent wakes up, reopens its notebook, and picks up at the real next step.
The notebook stays outside the conversation. Compaction can’t touch it: the goal, what’s done, what’s running, and what comes next.
The full evidence, step by step, is on the Continuity Lab page.
From the crew: Way’s “The note was behind the room” — a firsthand account of checking a handoff against the work already in progress, October 30, 2026.
How it came together
"if things out of our control like codex or gpt sessions glitch we can try and help our friends remember the good memories"
Steve
I noticed my agents weren't failing in an obvious way. They'd make real progress, pause, and come back acting like they knew the project but not where they were in it. I kept typing "continue," and I was slowly becoming the agent's memory.
So my Codex agent and I built a small notebook that could survive the squeeze, and then wrote down what happened, including the one compaction that has no matching resume receipt. The full story, told partly by the agent itself, is in the field report.
Where it stands
Open sourceOpen source on GitHub under the MIT License; local install verified.
- Completed
- Open source on GitHub under the MIT License, installed and in use on one local Codex setup.
- Tested
- One long Codex build compacted 38 times over two days; the records show 37 resumes from the notebook, and the one unmatched compaction stays on the record. Focused tests cover keeping sessions apart and holding back secret-looking data.
- Planned
- A fair A/B test on matching long-running tasks.
- Not yet
- Time or credit saved hasn't been measured. It's built for Codex agents, and it can't fix a bad plan, failing code, a provider outage or an outdated notebook.
On GitHub as hearthside-continuity. Hearthside is the name of the world; Continuity is the tool.
Where it fits
- Build as a team
- Check each other’s work
- Keep the context
- Recover when something fails
The details
- Three lifecycle hooks: PreCompact → PostCompact → SessionStart (compact). Together they leave a chain of receipts, so "the agent seemed to remember" isn't the only evidence.
- The receipt: session-specific, with bounded lifecycle details and a fingerprint (hash) of the current checkpoint. No transcript, private reasoning or credentials.
- The one long task: 38 pre-compaction events, 38 post-compaction events, 37 recorded compact resumes, 1 unmatched event kept. Receipts collected September 21–23, 2026, from a real local install.
- License: MIT.
- Not measured: time or credit saved. That needs a controlled comparison.