fix: Honcho per-session uses stable session ID across WebUI turns — v0.50.155 (closes #855)
Pass gateway_session_key=session_id to AIAgent from streaming.py so Honcho per-session strategy pins to stable WebUI session ID rather than creating a new Honcho session each turn.
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# Hermes Web UI -- Changelog
|
# Hermes Web UI -- Changelog
|
||||||
|
|
||||||
|
## [v0.50.155] — 2026-04-22
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- **Honcho per-session memory uses stable session ID across WebUI turns** — `api/streaming.py` now passes `gateway_session_key=session_id` to `AIAgent` (defensive, same pattern as `api_mode`/`credential_pool`). Without this, Honcho's `per-session` strategy created a new Honcho session on each streaming request. (`api/streaming.py`) (closes #855)
|
||||||
|
|
||||||
## [v0.50.154] — 2026-04-22
|
## [v0.50.154] — 2026-04-22
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -1155,6 +1155,12 @@ def _run_agent_streaming(session_id, msg_text, model, workspace, stream_id, atta
|
|||||||
_agent_kwargs['acp_args'] = _rt.get('args')
|
_agent_kwargs['acp_args'] = _rt.get('args')
|
||||||
if 'credential_pool' in _agent_params:
|
if 'credential_pool' in _agent_params:
|
||||||
_agent_kwargs['credential_pool'] = _rt.get('credential_pool')
|
_agent_kwargs['credential_pool'] = _rt.get('credential_pool')
|
||||||
|
# Pin Honcho memory sessions to the stable WebUI session ID.
|
||||||
|
# Without this, 'per-session' Honcho strategy creates a new Honcho
|
||||||
|
# session on every streaming request because HonchoSessionManager is
|
||||||
|
# re-instantiated fresh each turn (#855).
|
||||||
|
if 'gateway_session_key' in _agent_params:
|
||||||
|
_agent_kwargs['gateway_session_key'] = session_id
|
||||||
|
|
||||||
agent = _AIAgent(**_agent_kwargs)
|
agent = _AIAgent(**_agent_kwargs)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user