Skip to content

fix(gateway): dispatch memory session-end hooks on expiry#11304

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/gateway-session-end-memory-hook
Open

fix(gateway): dispatch memory session-end hooks on expiry#11304
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/gateway-session-end-memory-hook

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary\n- dispatch MemoryProvider session-end hooks from the live gateway agent before the flush worker tears the session down\n- keep the existing flush-agent behavior intact for builtin memory and skills\n- add a regression test covering cached gateway agents\n\nWhy\n- gateway session expiry/reset currently runs the flush worker but never calls the live memory manager's \ hook\n- memory providers that rely on end-of-session extraction therefore miss their final pass on gateway platforms\n\nFixes #11205\n\nTesting\n- python3 -m pytest -o addopts='' tests/gateway/test_flush_memory_stale_guard.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery tool/memory Memory tool and memory providers labels Apr 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate pair: this and #11410 fix the same issue (#11205). #15132 (merged) partially addressed this with on_session_finalize. Maintainer should pick one or confirm #15132 already covers the gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants