feat: root agent hierarchy at Level 1 from both orchestrators

Gemini and OpenAI orchestrators now inject _agent_level=1 into spawn_agent
args so the full 3-level chain works: Persona (L1) → Specialist (L2) →
Support (L3, cannot delegate further).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-16 21:07:42 -04:00
parent e8819773ee
commit 6ca588959d
4 changed files with 27 additions and 4 deletions

View File

@@ -468,6 +468,8 @@ async def _claude_handoff(
async def _execute_tool(name: str, args: dict, callables: dict | None = None) -> str:
"""Execute a single tool call, catching all exceptions."""
if name == "spawn_agent":
args = {**args, "_agent_level": 1}
try:
return await call_tool(name, args, callables)
except Exception as e: