Quoting Mario Zechner
Jun 3, 2026
Mario on session durability in Pi, a rough design pattern for resumable agents
durability is multi-layered. for pi’s agent abstraction, durability is really just about:
store completed LLM responses
store completed tool execution results (only the parts that get send to the LLM, not the effects, e.g. file changes, separate concern)
store phase we are in (idle, llm streaming, tools executing, compaction, retry)
if the agent goes belly up for some reason, that info is enough to let it pick up where it left. based on phase, harness can decide to auto-resume/retry, or let user give a choice.
that’s the lowest possible level of durability. everything else, e.g. durable agent orchestration, can be built on top of that.