github →

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.

Issue
enhancementupstream-changecli-paritygateway

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/ via api/models.py
  • Target: SQLite state.db via the SessionDB class 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)".

Assessmentadvisory
feature●●● hard95% confidence

Cross-cutting storage migration requiring data migration, transition flags, API model changes, and coordination with upstream CLI SessionDB.

Likely files
  • 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
Create the request

This opens a fresh agent run and a draft PR for issue #498.

Cancel