Skip to content

The agent that grows with you

fix(delegation): make remaining-depth guidance unambiguous

funky-xamarin8ae0a21a4cb8
diff --git a/tests/tools/test_delegate_depth_prompt.py b/tests/tools/test_delegate_depth_prompt.py
index e6761c695e4..f43cf7c74ec 100644
--- a/tests/tools/test_delegate_depth_prompt.py
+++ b/tests/tools/test_delegate_depth_prompt.py
@@ -76,4 +76,5 @@ def test_dispatched_child_prompt_matches_depth_capability(
if depth + 1 >= max_depth:
assert "children MUST be leaves" in prompt
else:
- assert "children can themselves be orchestrators" in prompt
+ assert "children can themselves delegate because depth remains" in prompt
+ assert "orchestrators or leaves" not in prompt
diff --git a/tools/delegate_tool_progress.py b/tools/delegate_tool_progress.py
index f209756c09e..f5903a1ed96 100644
--- a/tools/delegate_tool_progress.py
+++ b/tools/delegate_tool_progress.py
@@ -171,8 +171,8 @@ _LEAF_CHILDREN_NOTE = (
"The system manages this automatically; no parameter override is available."
)
_NESTED_CHILDREN_NOTE = (
- "Your own children can themselves be orchestrators or leaves; the system determines this automatically "
- "based on the remaining depth budget. No parameter override is needed or available."
+ "Your own children can themselves delegate because depth remains. The system determines this automatically "
+ "from the nesting depth; children at the maximum depth cannot delegate further. No parameter override is available."
)
def _build_child_system_prompt(