Pi Notes
A TypeScript extension that preserves coding-agent task state across context compaction and session branches, with atomic checkpoints, integrity checks, and lifecycle tests.
I built Pi Notes to carry task state through long coding sessions. The extension saves a compact checkpoint of the current objective, completed work, findings, decisions, blockers, verification, and next action. It stores that checkpoint outside the project tree, under the Pi session’s own identity.
Session branches retain their own checkpoint state. Changing branches restores the corresponding checkpoint, while new sessions and forks receive fresh identities. An explicit resume command can seed a new identity from a compatible checkpoint.
Freshness tracking marks a checkpoint dirty after changes, test results, errors, or sustained investigation. Reminders prompt the agent to update it as work progresses and recover it after context compaction. I separated activation from checkpoint freshness and kept the static policy stable to avoid invalidating the prompt cache when automatic tracking turns on.
The checkpoint tool validates payload limits and atomically rewrites the file. Integrity checks detect unexpected edits, and restoration rematerializes the committed snapshot. Lifecycle tests cover branch recovery, compaction, inherited checkpoints, and external changes. A checkpoint records continuity state; it does not replace the tests or evidence needed to verify the work.