fix subagent max iteration limit

This commit is contained in:
hanyuanling
2026-04-30 13:45:40 +08:00
committed by Xubin Ren
parent f8fd9f0011
commit 3c20d16117
5 changed files with 165 additions and 5 deletions
+2
View File
@@ -394,6 +394,8 @@ class MyTool(Tool):
if "min_len" in spec and len(str(value)) < spec["min_len"]:
return f"Error: '{key}' must be at least {spec['min_len']} characters"
setattr(self._loop, key, value)
if key == "max_iterations" and hasattr(self._loop, "_sync_subagent_runtime_limits"):
self._loop._sync_subagent_runtime_limits()
self._audit("modify", f"{key}: {old!r} -> {value!r}")
return f"Set {key} = {value!r} (was {old!r})"