From 40e0e7ad56f7faac24c757b11d3ef6f0f9b83de4 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Sat, 1 Aug 2026 13:04:10 +0530 Subject: [PATCH] =?UTF-8?q?docs(acp):=20correct=20late-refresh=20docstring?= =?UTF-8?q?=20=E2=80=94=20post-first-turn=20tools=20land=20via=20between-t?= =?UTF-8?q?urns=20refresh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The claim 'late tools then require an explicit /reload-mcp' was false on current main: the between-turns prologue refresh (agent/turn_context.py) picks up late-connecting servers cache-safely at every turn boundary, and ACP has no /reload-mcp. The daemon's real marginal value is tool-list freshness in the [session created -> first message] window. --- acp_adapter/server.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/acp_adapter/server.py b/acp_adapter/server.py index b234650de3d62..65241f6978dde 100644 --- a/acp_adapter/server.py +++ b/acp_adapter/server.py @@ -1055,8 +1055,12 @@ class HermesACPAgent(acp.Agent): Cache safety: the rebuild only runs while the session is still pre-first-turn (no API call made yet → nothing cached to invalidate). Once the user has sent a message we leave the snapshot frozen rather - than break the cached prompt prefix mid-conversation; late tools then - require an explicit ``/reload-mcp`` (user-consented), exactly as today. + than break the cached prompt prefix mid-conversation; servers that land + later are picked up cache-safely by the between-turns prologue refresh + (``agent/turn_context.py``) at the next turn boundary. The marginal + value of this pre-first-turn daemon is therefore freshness in the + window [session created → first message] — e.g. the "Available tools" + listing a client may request before the first prompt. No-op when discovery already finished, when the join times out, when the registry was unchanged, or when the session was closed while waiting. """