Restoring a conversation within the model’s limits
A saved conversation can outgrow the model’s context window. Reloading the transcript into a new session therefore needs a decision about which messages fit and how much earlier context to retain.
I implemented restoration that measures the conversation against a configurable context budget. It can keep recent messages or summarize older exchanges, and it can reuse cached summaries when restoring the same history again.
Summarization can fail or take too long, so the implementation includes time limits and a fallback to recent messages. It also exposes restoration progress and whether only part of the conversation was loaded, giving the application enough information to explain the session’s state.
