Describe the bug
The session_search tool incorrectly reports the source field in session summaries. The actual session file contains the correct platform metadata, but the search summary displays a different value.
Example:
- Session file metadata:
"platform": "api_server" (created via Hermes Workspace)
session_search output: "source": "telegram"
This affects all sessions — the source is being misreported at read/summarize time, not at write time.
To Reproduce
- Start a new chat in Hermes Workspace (creates session via
api_server platform)
- Ask the agent to search for that session:
session_search(query="<topic from session>")
- Compare the
source field in the search result with the actual session file:
head -20 ~/.hermes/sessions/session_<ID>.json
Expected:
Actual:
"source": "telegram" // or another incorrect platform
Evidence
Session file (~/.hermes/sessions/session_20260426_010820_6ed506e7.json):
{
"session_id": "20260426_010820_6ed506e7",
"platform": "api_server",
"model": "qwen3.5:397b",
...
}
session_search output for the same session:
{
"session_id": "20260426_010820_6ed506e7",
"source": "telegram",
"model": "qwen3.5:397b",
...
}
Impact
- Confuses users about where sessions originated
- Breaks trust in session metadata for auditing/debugging
- Blocks A2A handoffs — agents can't reliably determine session provenance, which is critical for multi-agent workflows and platform continuity
Root Cause (likely)
The bug is in the session_search tool's summarization logic — either:
- Reading the wrong field from the session JSON
- Using a hardcoded/default value instead of the actual
platform field
- Transforming the value incorrectly during summary generation
The session files themselves are correct — this is a read-time bug, not a write-time bug.
Suggested Fix
- Locate the
session_search implementation in hermes-agent (likely in tools/ or agent/)
- Verify it reads the
platform field directly from the session JSON
- Ensure the
source field in summaries maps 1:1 from platform
- Add a test case that verifies platform accuracy across different session sources (cli, telegram, api_server, discord, etc.)
Related
- Potential A2A (Agent-to-Agent) session visibility — accurate provenance is required for handoffs
- No existing issue tracks this specific metadata accuracy problem
Describe the bug
The
session_searchtool incorrectly reports thesourcefield in session summaries. The actual session file contains the correctplatformmetadata, but the search summary displays a different value.Example:
"platform": "api_server"(created via Hermes Workspace)session_searchoutput:"source": "telegram"This affects all sessions — the source is being misreported at read/summarize time, not at write time.
To Reproduce
api_serverplatform)session_search(query="<topic from session>")sourcefield in the search result with the actual session file:Expected:
Actual:
Evidence
Session file (
~/.hermes/sessions/session_20260426_010820_6ed506e7.json):{ "session_id": "20260426_010820_6ed506e7", "platform": "api_server", "model": "qwen3.5:397b", ... }session_searchoutput for the same session:{ "session_id": "20260426_010820_6ed506e7", "source": "telegram", "model": "qwen3.5:397b", ... }Impact
Root Cause (likely)
The bug is in the
session_searchtool's summarization logic — either:platformfieldThe session files themselves are correct — this is a read-time bug, not a write-time bug.
Suggested Fix
session_searchimplementation inhermes-agent(likely intools/oragent/)platformfield directly from the session JSONsourcefield in summaries maps 1:1 fromplatformRelated