mirror of
https://github.com/usestrix/strix.git
synced 2026-09-22 00:31:25 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
parent
9cba355b54
commit
c1a464a9de
1 changed files with 11 additions and 0 deletions
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue