mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-29 11:42:04 +00:00
After context compression, the parent session holds pre-compression messages and a child (or deeper descendant) holds the continuation. resolve_resume_session_id() short-circuited when the input session already had messages (row is not None -> return session_id), causing REST API endpoints, gateway resume, and CLI resume to serve stale parent messages. Remove the early-return. Walk the full descendant chain, record the deepest node that has messages (best), and return best if not None else the original session_id (preserving the empty-chain fallback). Callers (api_server.py, web_server.py, cli_agent_setup_mixin.py, cli_commands_mixin.py) all use the resolved != input -> redirect pattern and are transparent to this change. |
||
|---|---|---|
| .. | ||
| test_get_anchored_view.py | ||
| test_get_messages_around.py | ||
| test_resolve_resume_session_id.py | ||
| test_session_archiving.py | ||