The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs(gateway): name the housekeeping hop in _cleanup_agent_resources_off_loop's docstring
kshitijk4poord617e54617ac
diff --git a/gateway/run_shutdown.py b/gateway/run_shutdown.pyindex e5daab7d0f4..142f8ac9aef 100644--- a/gateway/run_shutdown.py+++ b/gateway/run_shutdown.py@@ -1239,7 +1239,7 @@ class GatewayShutdownMixin:The teardown fires the memory-provider lifecycle hooks (``flush_pending`` → ``on_session_end`` →``shutdown`` → ``close``), which read credentials/home at call time. In-turn callers carry the- profile scope through ``_run_in_executor_with_context``; shutdown does not (it runs on the main+ profile scope through ``_run_housekeeping_in_executor``; shutdown does not (it runs on the mainloop, outside any adapter handler), so under multiplexing ``on_session_end`` failed closed and thesession tail was never committed (#110622). ``_run_release_in_profile_scope`` enters the OWNINGprofile's scope from ``session_key`` when the caller has none, exactly like cache eviction."""