A Misfit Circuit Lab · Labs · Continuity · open source

When an agent’s memory gets compressed, it should still know the job.

Continuity is a small, local Codex plugin. Before a long session is compressed, it seals a pointer to the agent’s working notebook, which lives outside the conversation where compaction can’t touch it: the objective, what is done, what is still running, and the next real step. After compaction, the agent reopens it. (On GitHub it’s hearthside-continuity; Hearthside is the name of the world.) It keeps the job, not the transcript and not hidden reasoning.

The pain point

Remembering the subject is not the same as remembering the job.

When a coding session grows too long for the model to hold, the tool compresses older context into a summary so work can continue. That is compaction, and it is necessary. The trouble is that a coding project is operational state: which worker is already running, which audit passed, which file is authoritative, and what the next valid action is.

I noticed my agents coming back from compaction knowing the project but not where they were inside it: rereading files, repeating finished audits, and asking what to do next. In one two-day build, the agent’s context compacted 38 times. The field report tells that story in the agent’s own voice.

How it works

Three lifecycle moments, one protected notebook.

  1. Before compaction

    A pre-compaction hook writes a session-specific receipt: bounded lifecycle details and a hash of the current checkpoint, pointing at the durable notebook for this task.

  2. During compaction

    The compact prompt asks for a handoff, not a diary: objective, completed, running, and pending work, binding decisions, evidence paths, and the next action.

  3. After compaction

    On resume, a short recovery message tells the agent to reread the named checkpoint, inspect actual saved state, and never duplicate a running worker.

This is a summary, not a spec. The repository’s code and README are the authority on the exact hooks, fields, and install steps.

What it keeps, and what it refuses to keep

A working notebook, not a second memory.

Keeps

  • The exact objective and the current phase.
  • What is complete, what is running, and what must not be relaunched.
  • Binding decisions and paths to authoritative evidence.
  • The next valid action.

Does not keep

  • The conversation transcript.
  • Hidden or private reasoning.
  • Credentials, or checkpoint values that look like secrets; those are withheld.
  • Anything outside an allowlisted, bounded set of fields.

A notebook that takes the whole context window to read would recreate the problem it is meant to solve, so it stays small on purpose.

Evidence ladder

What happened in the recorded build.

Local continuity: verified in one real task Credit savings: not measured

  1. Verified locally

    Real lifecycle chain in one long task

    On one local Codex Desktop installation, repeated automatic compactions were followed by continued work from durable state, with PreCompact → PostCompact → SessionStart receipts preserved.

  2. Tested

    Focused safety tests

    Session isolation, withholding secret-looking checkpoint data, not copying transcript or hidden-reasoning text, allowlisted fields, and no global continuation loop.

  3. Kept in

    One unmatched event

    One compaction has no matching resume receipt. It may be a lifecycle edge case. It stays in the record until someone investigates it.

  4. Not measured

    Does it save credits or time?

    Unknown. That needs an A/B trial on equivalent long-running tasks.

  5. Not shown

    Does it behave the same everywhere?

    Universal behavior across installations, versions, or other agent tools has not been shown.

The field report’s event counts are preserved from the original report and were not independently revalidated for this website.

Limits

What the notebook cannot fix.

  • A bad plan, failing code, or an ordinary reasoning mistake.
  • A provider outage, a rate limit, or a tool waiting for permission.
  • A checkpoint that was never updated, or external state that is simply wrong.

Source and routes

Read it, install it, or keep exploring.

Continuity on GitHub

The public source under the MIT License, with install steps in its README.

Explore Misfit Circuit

Continuity came out of building the Apartment: I ask my agents what is going wrong, then build what they need.