Session Restore Guard
On SessionStart, read entries from the ledger's declared 30-day restore horizon and verify chain integrity, then add a short summary as context. The append-only ledger remains locally bounded to 1 MiB until explicit removal. A tampered ledger is surfaced as an integrity failure, never silently trusted; a missing ledger adds nothing.
Runs on
What it does
Inject a bounded, integrity-flagged summary of the latest session-ledger checkpoints at session start.
When it fires
- operations
- handoff
How it behaves
Inject a bounded integrity-flagged ledger summary as session context.
It does not block, delay, or alter the observed event; it records or reports only.
It does not execute submitted content, call an LLM, or transmit any data off the machine.
It does not treat unreadable, symlinked, or oversized state as valid evidence.
Configuration
targets/claude-code/session-restore-guard.mjs
- Version
- 1.0.0
- Requires
- node
- Licence
- RiskThis observer injects a bounded, integrity-flagged summary of the latest session-ledger checkpoints at session start; it cannot block the event or mutate the inspected state.
- Low
- ModeHow it works: fixed rules, model instructions, or both.
- Deterministic only
- Behaviour
- Observes, does not intervene
- On failure
- Allows and continues
- LatencyTo inject a bounded, integrity-flagged summary of the latest session-ledger checkpoints at session start, the entrypoint may run a bounded local subprocess before returning.
- Bounded
- Data retentionWhether data remains after use and who manages its storage.
- Kept locally, bounded
- In packs
- Session continuity
Often used with
All in Operations