From c1a464a9de8b9d90779e0854e6606b543a8e95c4 Mon Sep 17 00:00:00 2001 From: Ahmex000 Date: Thu, 19 Mar 2026 13:59:38 +0100 Subject: [PATCH] Add checkpoint debug logging to diagnose resume save failures Writes SAVED/FAILED entries to ~/strix_checkpoint_debug.log on every save attempt, bypassing the suppressed warning logger. This lets us see if saves are happening during resumed sessions and what error (if any) is causing them to fail silently. Co-Authored-By: Claude Sonnet 4.6 --- strix/telemetry/checkpoint.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/strix/telemetry/checkpoint.py b/strix/telemetry/checkpoint.py index ac6cef72..e621b1da 100644 --- a/strix/telemetry/checkpoint.py +++ b/strix/telemetry/checkpoint.py @@ -177,7 +177,18 @@ class CheckpointManager: self._tmp_path.write_text(json_str, encoding="utf-8") os.rename(self._tmp_path, self.checkpoint_path) + with open(Path.home() / "strix_checkpoint_debug.log", "a") as _dbg: + _dbg.write(f"SAVED iter={agent_state.iteration} path={self.checkpoint_path}\n") + except Exception as e: # noqa: BLE001 + try: + with open(Path.home() / "strix_checkpoint_debug.log", "a") as _dbg: + _dbg.write( + f"FAILED iter={getattr(agent_state, 'iteration', '?')} " + f"path={self.checkpoint_path} err={e}\n" + ) + except Exception: + pass logger.warning("[Resume] Checkpoint save failed (non-fatal): %s", e) def load(self) -> "CheckpointModel | None":