Skip to content

The agent that grows with you

fix(cli): only a missing column/table means the read-only store needs migration

kshitijk4poorddbd7a9437db
diff --git a/hermes_cli/sessions_cmd.py b/hermes_cli/sessions_cmd.py
index 68ef5771831..f9c1497d88f 100644
--- a/hermes_cli/sessions_cmd.py
+++ b/hermes_cli/sessions_cmd.py
@@ -998,7 +998,7 @@ def cmd_sessions(args, sessions_parser=None):
try:
return handler(db, args)
except sqlite3.OperationalError as e:
- if not observational:
+ if not observational or not str(e).lower().startswith("no such "):
raise
# A read-only opener skips schema migration, so a store from an older release can lack a column.
print(f"Error: session database needs migration — run any writing hermes command first ({e})")