From fc967169565a5a6a90244215099301675b29439e Mon Sep 17 00:00:00 2001 From: 0xallam Date: Sat, 25 Apr 2026 16:29:51 -0700 Subject: [PATCH] refactor(agents-graph): drop redundant ``agent_finish_called`` set ``agent_finish`` was setting ``inner[\"agent_finish_called\"] = True`` at the top of its body, but ``StrixOrchestrationHooks.on_tool_end`` already does this for ``agent_finish`` and ``finish_scan`` after the tool returns. Doing it twice was harmless but suggested the flag's ownership was ambiguous; the hook is the single source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) --- strix/tools/agents_graph/tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/strix/tools/agents_graph/tools.py b/strix/tools/agents_graph/tools.py index 03b21ca..a71cfa0 100644 --- a/strix/tools/agents_graph/tools.py +++ b/strix/tools/agents_graph/tools.py @@ -557,7 +557,8 @@ async def agent_finish( default=str, ) - inner["agent_finish_called"] = True + # ``agent_finish_called`` is set by ``StrixOrchestrationHooks.on_tool_end``; + # no need to set it here. parent_notified = False if report_to_parent: