hermes - 💡(How to fix) Fix [Feature Request] Cross-platform session sharing via identity links [1 comments, 2 participants]

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…
GitHub stats
NousResearch/hermes-agent#20458Fetched 2026-05-06 06:36:44
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Fix Action

Fix / Workaround

Workaround (Current)

Code Example

session:
  dmScope: "per-channel-peer"  # Default: isolate by platform
  identityLinks:
    user-canonical-id:
      - "feishu:ou_xxxxx"
      - "telegram:123456789"
      - "webui:default"
      - "discord:987654321"

---

platform_toolsets:
     webui:
       - no_mcp
RAW_BUFFERClick to expand / collapse

Feature Request

Problem

Currently, when using Hermes Agent across multiple platforms (e.g., Feishu + WebUI, Telegram + WebUI), each platform creates its own isolated session. This causes:

  1. Memory overhead: Each session spawns its own MCP server instances. For example, with Lark MCP enabled, both Feishu and WebUI sessions each spawn a ~747 MB lark-mcp process, totaling ~1.5 GB for the same user.

  2. Context fragmentation: Users cannot seamlessly switch between platforms while maintaining conversation continuity. Starting a task in Feishu and continuing it in WebUI requires manual context transfer.

Proposed Solution

Add a session.identityLinks configuration similar to OpenClaw's implementation, allowing users to map multiple platform identities to a canonical user ID:

session:
  dmScope: "per-channel-peer"  # Default: isolate by platform
  identityLinks:
    user-canonical-id:
      - "feishu:ou_xxxxx"
      - "telegram:123456789"
      - "webui:default"
      - "discord:987654321"

When configured, all linked identities would share a single session, enabling:

  • Seamless platform switching: Start a conversation on mobile (Telegram/Feishu), continue on desktop (WebUI)
  • Resource efficiency: Single MCP server instance per user instead of per-platform
  • Unified context: Shared conversation history, memory, and state across all platforms

Implementation Notes

The session key builder (gateway/session.py:build_session_key()) would need to:

  1. Check if the current platform:user_id exists in any identityLinks mapping
  2. If found, use the canonical ID instead of the platform-specific ID
  3. Fall back to current behavior if no mapping exists

Workaround (Current)

Users can partially mitigate memory overhead by:

  1. Adding platform-specific toolset configs with no_mcp sentinel:
    platform_toolsets:
      webui:
        - no_mcp
  2. This disables MCP servers for that platform but doesn't solve context fragmentation

References

Use Case

Multi-device workflows where users want to:

  • Start research on mobile during commute
  • Continue implementation on desktop workstation
  • Review results on tablet
  • All within a single continuous conversation context

extent analysis

TL;DR

Implementing a session.identityLinks configuration to map multiple platform identities to a canonical user ID can help mitigate memory overhead and context fragmentation.

Guidance

  • Review the proposed session.identityLinks configuration and its potential to unify user sessions across platforms.
  • Consider the implementation notes for the session key builder in gateway/session.py:build_session_key() to ensure correct handling of canonical IDs.
  • Evaluate the current workaround using platform-specific toolset configs with no_mcp sentinel and its limitations in addressing context fragmentation.
  • Explore the OpenClaw implementation referenced in the issue for additional insights on identity linking.

Example

session:
  dmScope: "per-channel-peer"
  identityLinks:
    user-canonical-id:
      - "feishu:ou_xxxxx"
      - "telegram:123456789"
      - "webui:default"
      - "discord:987654321"

This example configuration demonstrates how to link multiple platform identities to a single canonical user ID.

Notes

The implementation of session.identityLinks requires careful consideration of the session key builder's logic to ensure seamless platform switching and resource efficiency.

Recommendation

Apply the proposed session.identityLinks configuration to unify user sessions and mitigate memory overhead and context fragmentation, as it provides a more comprehensive solution than the current workaround.

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 - 💡(How to fix) Fix [Feature Request] Cross-platform session sharing via identity links [1 comments, 2 participants]