Skip to content

Hermes agentmemory plugin: sync_turn() fails on unexpected keyword argument session_id #249

@OptionalCoin

Description

@OptionalCoin

Summary
The Hermes agentmemory plugin’s memory-provider hook signature is too strict for the arguments Hermes passes at runtime. As a result, sync_turn() throws an exception when Hermes includes extra context kwargs such as session_id.
Environment

  • Hermes Agent
  • agentmemory plugin enabled
  • Linux user-service deployment
  • Observed with normal CLI conversation turns
    Actual behavior
    Hermes logs repeated warnings like:
    Memory provider 'agentmemory' sync_turn failed: AgentMemoryProvider.sync_turn() got an unexpected keyword argument 'session_id'
    text

Expected behavior

The plugin should accept Hermes-passed context kwargs without failing, or the plugin/runtime contract should be updated so the hook signature matches the actual runtime call.

Root cause

The plugin currently defines:
def sync_turn(self, user: str, assistant: str) -> None:
text
But Hermes calls it with additional keyword arguments, including session_id.
This is a contract mismatch between Hermes and the plugin implementation.

Impact

  • Repeated warning spam in logs
  • sync_turn does not complete cleanly
  • Conversation-turn memory sync may be degraded or skipped
  • Extra noise makes real failures harder to spot

Reproduction steps

  1. Install and enable the agentmemory plugin in Hermes.
  2. Start a Hermes session.
  3. Run a normal conversation turn.
  4. Check ~/.hermes/logs/agent.log or ~/.hermes/logs/errors.log.

Observed log

Memory provider 'agentmemory' sync_turn failed: AgentMemoryProvider.sync_turn() got an unexpected keyword argument 'session_id'
text

Suggested fix

Update hook methods to tolerate passthrough kwargs from Hermes:
def sync_turn(self, user: str, assistant: str, **kwargs: Any) -> None:
text
It may also be prudent to make other memory-provider hook methods tolerant of extra context kwargs as well, such as:

  • prefetch
  • queue_prefetch

Local verification

I patched the local plugin by adding **kwargs to the affected methods and then verified:

  • Python syntax check passed
  • Hermes CLI smoke run completed successfully
  • The patched session no longer surfaced the unexpected keyword argument 'session_id' failure

Notes

This appears to be a real runtime compatibility bug, not an installation issue. The plugin loads and activates, but one hook call path is not compatible with the arguments Hermes passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions