This note explains how to think about durable state in Pi when the user navigates the session tree with /tree, starts a new session, resumes another session, or forks.
The short version:
- Pi sessions are an append-only tree of entries with a movable leaf pointer.
/treedoes not restart the extension runtime. It changes the active leaf and rebuilds the active conversation context.- If your extension keeps in-memory state, you are responsible for reconstructing it from durable session entries.
- The central design decision is whether your state should be: