New request
#498: feat(storage): unified session storage — share SessionDB between WebUI and CLI
We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.
Summary
The WebUI and the CLI agent use separate session stores. The WebUI reads CLI sessions from state.db as read-only imports, but edits made in the WebUI (rename, archive, pin, tag) don't write back. There are effectively two session records for the same conversation.
Proposed behaviour
Migrate WebUI session persistence to share the same SQLite SessionDB that the CLI uses, so that both surfaces read and write the same record. No "import" step needed; all sessions are first-class everywhere.
Implementation notes
- Current WebUI store: JSON files in
~/.hermes/webui-public/sessions/viaapi/models.py - Target: SQLite
state.dbvia theSessionDBclass from hermes-agent - Migration: existing JSON session files need to be ingested into SQLite on first run
- This is a significant architectural change; a transition flag or gradual migration is appropriate
- Also unlocks: sharing tool_calls, pending approvals, and context across surfaces
Tracked in ROADMAP.md as "Unified session storage (PR #75)".
Cross-cutting storage migration requiring data migration, transition flags, API model changes, and coordination with upstream CLI SessionDB.
- api/models.py
- api/session_store.py
- api/migration/json_to_sqlite.py
- server.py
- api/bootstrap.py
- tests/test_session_storage.py
- infra/config/deploy.sh