Architecture: Should agent nesting go beyond depth-2, and how should resou...
Documentation for Sessions
🏗️ Architecture: Should agent nesting go beyond depth-2, and how should resou...
Date: 2026-03-20
Time: 17:40:50 UTC
Session: gspace1-240.7
Agent: orchestrator
Confidence: 93%
Status: ✅ Documented
📋 Decision Context
Question:
Should agent nesting go beyond depth-2, and how should resources be managed?
Task: S240: Agent nesting depth-2 support
🎯 Decision Made
Chosen:
Depth-2 maximum with strict constraints: depth-2 sub-sub-Vittos limited to in-process tier only (no VM nesting), inherit 50% of parent's remaining cost budget, max 3 tools. No depth-3+.
Options Considered:
- Keep MAX_DEPTH=1 (no nesting)
- Depth-2 with resource guards (chosen)
- Unlimited depth with budget-only constraints
💭 Reasoning
Human teams rarely delegate deeper than 2 levels (manager → developer → reviewer). Depth-3+ is bureaucracy. VM nesting at depth-2 would cause resource explosion: 8 concurrent sub-Vittos each spawning 8 sub-sub-Vittos with VMs = 64 VMs. In-process only at depth-2 caps this. 50% budget inheritance prevents cost runaway. 3-tool limit keeps sub-sub-Vittos focused on specific tasks (e.g., a test runner sub-sub-Vitto needs run_command + read_file + task_complete). The existing MAX_DEPTH=1 in SubVittoOrchestratorService was the only change needed — bump to 2 with the resource guards.
📁 Files Involved
APIs/backend-vitto-api/src/app/engine/sub-vitto-orchestrator.service.ts
🔗 Related
- Decision ID:
dev_1774028449947_veqh6fq - Session: 240
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation