hermes - ✅(Solved) Fix [Bug]: viking_remember creates empty sessions — data never persisted [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

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…
GitHub stats
NousResearch/hermes-agent#17998Fetched 2026-05-01 05:54:32
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

These issues point to similar behaviour:
- Issue #7759 (closed) — /new and /reset failed to trigger session commits. Same root cause area but different symptom.
- PR #5780 — Added a deterministic fallback: explicit memory() writes now go to /api/v1/resources/temp_upload under viking://resources/hermes_explicit_memories/ because "extraction is lossy — the LLM rewrites and categorizes." This is essentially a workaround for the same problem.
- Issue #5627 — Identifies that only ~30% of OpenViking API is used, and calls out: "No way to store structured documents without wrapping them in a session conversation."

Fix Action

Fix / Workaround

These issues point to similar behaviour:
- Issue #7759 (closed) — /new and /reset failed to trigger session commits. Same root cause area but different symptom.
- PR #5780 — Added a deterministic fallback: explicit memory() writes now go to /api/v1/resources/temp_upload under viking://resources/hermes_explicit_memories/ because "extraction is lossy — the LLM rewrites and categorizes." This is essentially a workaround for the same problem.
- Issue #5627 — Identifies that only ~30% of OpenViking API is used, and calls out: "No way to store structured documents without wrapping them in a session conversation."

PR fix notes

PR #18002: fix(openviking): commit explicit remember memories

Description (problem / solution / changelog)

Summary

  • Store viking_remember notes with the same content message shape used by normal OpenViking turn sync.
  • Commit the OpenViking session immediately after an explicit remember write so extraction/indexing is triggered.
  • Add a regression test for the message payload and commit call.

Root cause

viking_remember posted a message using a parts payload and then waited for a later session commit. For explicit remember-only writes, that could leave OpenViking with an empty/uncommitted session and no extracted memories.

Fix

Use the content field for the remembered text and call /commit after the message write.

Regression coverage

  • tests/plugins/memory/test_openviking_provider.py::test_tool_remember_posts_content_message_and_commits_session

Testing

  • scripts/run_tests.sh tests/plugins/memory/test_openviking_provider.py::test_tool_remember_posts_content_message_and_commits_session -q
  • scripts/run_tests.sh tests/plugins/memory/test_openviking_provider.py tests/openviking_plugin/test_openviking.py -q

Closes #17998

Changed files

  • plugins/memory/openviking/__init__.py (modified, +3/-4)
  • tests/plugins/memory/test_openviking_provider.py (modified, +18/-0)

Code Example

Report       https://paste.rs/qLpp4
  agent.log    https://paste.rs/TS4u3
  gateway.log  https://paste.rs/qxJJN

---

These issues point to similar behaviour:
- Issue #7759 (closed)/new and /reset failed to trigger session commits. Same root cause area but different symptom.
- PR #5780Added a deterministic fallback: explicit memory() writes now go to /api/v1/resources/temp_upload under viking://resources/hermes_explicit_memories/ because "extraction is lossy — the LLM rewrites and categorizes." This is essentially a workaround for the same problem.
- Issue #5627Identifies that only ~30% of OpenViking API is used, and calls out: "No way to store structured documents without wrapping them in a session conversation."
RAW_BUFFERClick to expand / collapse

Bug Description

The viking_remember tool reports success ("Memory recorded. Will be extracted and indexed on session commit.") but creates sessions with 0 messages. Data is never written to OpenViking.

Steps to Reproduce

  1. Call viking_remember(content="some fact", category="entity")
  2. Tool returns success
  3. Check session via API → message_count: 0, memories_extracted.total: 0
  4. Search via viking_search → 0 results

Expected Behavior

viking_remember should add messages to the session and commit so memory extraction runs.

Actual Behavior

Empty sessions created, no memories extracted, content not searchable. The success message is misleading.

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/qLpp4
  agent.log    https://paste.rs/TS4u3
  gateway.log  https://paste.rs/qxJJN

Operating System

Ubuntu 24.04

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

These issues point to similar behaviour:
- Issue #7759 (closed) — /new and /reset failed to trigger session commits. Same root cause area but different symptom.
- PR #5780 — Added a deterministic fallback: explicit memory() writes now go to /api/v1/resources/temp_upload under viking://resources/hermes_explicit_memories/ because "extraction is lossy — the LLM rewrites and categorizes." This is essentially a workaround for the same problem.
- Issue #5627 — Identifies that only ~30% of OpenViking API is used, and calls out: "No way to store structured documents without wrapping them in a session conversation."

Root Cause Analysis (optional)

The OpenViking memory provider plugin — specifically:

  • Plugin: plugins/memory/openviking/init.py
  • Tool: viking_remember (likely in tools/viking_*.py)
  • Session lifecycle: initialize() → session creation, sync_turn() → message passing, on_session_end() → commit

The bug is in how viking_remember handles the session message pipeline — it creates a session via POST /sessions/create but never calls POST /sessions/{id}/message to populate it before the commit step. So the commit runs on an empty session.

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

extent analysis

TL;DR

The issue can be fixed by modifying the viking_remember tool to populate the session with messages before committing it.

Guidance

  • Review the viking_remember tool in tools/viking_*.py to ensure it correctly calls POST /sessions/{id}/message to add messages to the session before committing.
  • Verify that the session is being populated by checking the message_count in the session API response after calling viking_remember.
  • Investigate the openviking memory provider plugin in plugins/memory/openviking/__init__.py to ensure it is correctly handling session creation and message passing.
  • Check the agent.log and gateway.log for any errors or warnings related to session creation or message passing.

Example

# Example of how viking_remember could be modified to populate the session
def viking_remember(content, category):
    # Create a new session
    session_id = create_session()
    
    # Add a message to the session
    add_message_to_session(session_id, content, category)
    
    # Commit the session
    commit_session(session_id)

Notes

The provided Root Cause Analysis suggests that the issue is with the viking_remember tool not populating the session with messages before committing. However, without the actual code, it's difficult to provide a precise fix.

Recommendation

Apply workaround: Modify the viking_remember tool to correctly populate the session with messages before committing, as described in the guidance section. This should fix the issue until a more permanent solution can be implemented.

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

hermes - ✅(Solved) Fix [Bug]: viking_remember creates empty sessions — data never persisted [1 pull requests, 1 participants]