From 15f662a279c620b91dd282fd419085bae75130ae Mon Sep 17 00:00:00 2001 From: "juvenal.diaz" Date: Sat, 14 Nov 2026 23:52:04 -0600 Subject: [PATCH] Stop repeated volume decisions in Holmes --- scripts/ollama-tool-proxy.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ollama-tool-proxy.py b/scripts/ollama-tool-proxy.py index 3c27e23..3c3b85d 100644 --- a/scripts/ollama-tool-proxy.py +++ b/scripts/ollama-tool-proxy.py @@ -178,6 +178,10 @@ def complete(request, bash_mode): "Otherwise state what evidence is missing. Do not repeat the PVC or PV lookup."}] retried = translate(query_ollama(retry), request["tools"]) print("resource_decision_retry", "tool_call=" + str(bool(retried["choices"][0]["message"].get("tool_calls"))), flush=True) + if same_as_last_call(retried["choices"][0]["message"], messages): + retried["choices"][0]["message"] = {"role": "assistant", "content": + "JEANNIE_STOP_REPEATED_TOOL_CALL: Holmes repeated the preceding command; investigation is incomplete."} + retried["choices"][0]["finish_reason"] = "stop" return retried next_check = ("The PVC was already inspected. Check the bound PV by its actual PV name; use kubectl get pv, not get pvc. " if re.search(r"\bget\s+(?:pvc|persistentvolumeclaim)\b", previous) else