hermes - 💡(How to fix) Fix [Bug]: CLI sessions not indexed in sessions.json when running via hermes.exe (PowerShell/Windows) [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

Run hermes debug share from your terminal and paste the links here.

---

Report: https://pastebin.com/N8N1vewn
agent.log: https://pastebin.com/ddZyGDZ4
gateway.log: https://pastebin.com/CKQPyPvb
RAW_BUFFERClick to expand / collapse

Bug Description

When running Hermes via hermes.exe directly (PowerShell/Windows Terminal, not through gateway), session files are saved as session_*.json in ~/.hermes/sessions/, but the session is NOT added to sessions.json index. This means the session doesn't appear in session_search.

Steps to Reproduce

  1. Open PowerShell / Windows Terminal
  2. Run: $env:OPENROUTER_API_KEY = "sk-or-v1-..." then hermes
  3. Have a conversation
  4. Exit Hermes (exit)
  5. Check ~/.hermes/sessions/sessions.json — the session is missing from the index
  6. Check ~/.hermes/sessions/session_*.json — the session file exists with correct data

Expected Behavior

New session should be indexed in sessions.json automatically and appear in session_search.

Actual Behavior

Session file (session_*.json) is created with correct data, but sessions.json index is not updated. Session is invisible to session_search.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

Run hermes debug share from your terminal and paste the links here.

Operating System

Windows 11

Python Version

3.11.9

Hermes Version

v0.14.0 (2026.5.16)

Additional Logs / Traceback (optional)

Report: https://pastebin.com/N8N1vewn
agent.log: https://pastebin.com/ddZyGDZ4
gateway.log: https://pastebin.com/CKQPyPvb

Root Cause Analysis (optional)

Sessions created via gateway (Discord, Telegram, etc.) are indexed through gateway/session.py which calls SessionDB.add_session(). However, when running via hermes.exe CLI directly, the session file is written by cli.py but the sessions.json index update may not be triggered on exit. The session metadata file is created correctly, but the index entry is missing.

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING