From c28ff0902b7d130b469ba083e4198658766f0682 Mon Sep 17 00:00:00 2001 From: Andrew Emelyaneko Date: Sat, 31 Oct 2026 21:45:16 +0300 Subject: [PATCH] Fix StateStore persistence so restart state survives and dedupe state writes --- src/ollama_swap_agent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ollama_swap_agent.py b/src/ollama_swap_agent.py index 9ddda67..b19a4b9 100644 --- a/src/ollama_swap_agent.py +++ b/src/ollama_swap_agent.py @@ -66,6 +66,8 @@ class StateStore: def mutate(self, updater) -> Dict[str, Any]: with self.lock: result = updater(self.data) + if result is not None: + self.data = result self._save() return result