Skip to content

The agent that grows with you

fix(sessions): resolve the held-store scan path from the store resolver, not the db object

teknium1dfaf016dbcff
diff --git a/hermes_cli/sessions_cmd.py b/hermes_cli/sessions_cmd.py
index b5222020e01..1778f5dce90 100644
--- a/hermes_cli/sessions_cmd.py
+++ b/hermes_cli/sessions_cmd.py
@@ -1031,7 +1031,8 @@ def cmd_sessions(args, sessions_parser=None):
return
if action in _HELD_STORE_ACTIONS and not getattr(args, "dry_run", False) and not getattr(args, "force", False):
from hermes_state_holders import held_store_refusal
- refusal = held_store_refusal(db.db_path, command=action)
+ # Same resolver the SessionDB above opened, so the scan never depends on the db object.
+ refusal = held_store_refusal(_default_db_path(), command=action)
if refusal:
print(refusal)
return 1