Files
Hermes-ui/packages
356252190-star b07a8fc76f fix: add X-Hermes-Session-Id header to preserve tool context across turns (#240)
Fixes #237

When web-ui sends a chat message, it includes conversation_history with only
user and assistant messages — tool calls and tool results are filtered out.
Meanwhile, it sends session_id in the request body but does NOT pass the
X-Hermes-Session-Id header.

Without the header, the gateway falls back to using the incomplete
conversation_history from the body, so the AI agent loses context about
previous tool calls, especially after idle periods.

Fix: Pass X-Hermes-Session-Id as a request header so the gateway loads
complete session history from the session DB (including tool messages).

Co-authored-by: 356252190-star <356252190-star@users.noreply.github.com>
2026-04-26 17:47:39 +08:00
..