fix: Convert dictionary views to lists for stable iteration over agents and tool executions.

This commit is contained in:
Vincent550102
2026-01-02 14:17:32 -08:00
committed by Ahmed Allam
parent 90cae1cf97
commit 05cfdd7337
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -291,14 +291,14 @@ class Tracer:
def get_agent_tools(self, agent_id: str) -> list[dict[str, Any]]:
return [
exec_data
for exec_data in self.tool_executions.values()
for exec_data in list(self.tool_executions.values())
if exec_data.get("agent_id") == agent_id
]
def get_real_tool_count(self) -> int:
return sum(
1
for exec_data in self.tool_executions.values()
for exec_data in list(self.tool_executions.values())
if exec_data.get("tool_name") not in ["scan_start_info", "subagent_start_info"]
)