SessionPersistDriver (inMemory, IndexedDB, SQLite, Postgres, or custom).
How Auto-Restore Works
When you callsession.prompt(...) (or resumeSession(...)) and the saved session points to a stale connection, the SDK:
- Recreates a fresh session for the same local session id.
- Rebinds the local session to the new runtime session id.
- Replays recent persisted events into the next prompt as context.
Replay Limits
Replay payload size is capped by:replayMaxEvents(default50)replayMaxChars(default12000)