From adc291eb29cfee821d4afa09e4d2e2477603b8f7 Mon Sep 17 00:00:00 2001 From: afjcjsbx Date: Sun, 8 Mar 2026 16:18:19 +0100 Subject: [PATCH] safety comment on TickTTL --- pkg/agent/loop.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 0881ce93c..28ee30aba 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -1302,6 +1302,9 @@ func (al *AgentLoop) runLLMIteration( // Tick down TTL of discovered tools after processing tool results. // Only reached when tool calls were made (the loop continues); // the break on no-tool-call responses skips this. + // NOTE: This is safe because processMessage is sequential per agent. + // If per-agent concurrency is added, TTL consistency between + // ToProviderDefs and Get must be re-evaluated. agent.Tools.TickTTL() }