openhuman
openhuman copied to clipboard
Limit agent spawning depth to 3 levels
Summary
Enforce max subagent depth = 3 with orchestrator as top-level controller.
Scope
- Implement this requirement end-to-end.
- Add logs/diagnostics for easier debugging.
- Add/update tests for changed behavior.
Acceptance Criteria
- Requirement is implemented and validated.
- No regressions in related flows.
- Changes are documented where needed.
@Al629176 quick scope clarification — "max subagent depth = 3" means:
(a) ceiling at 3 (1–3 all fine), or (b) orchestrator must be able to nest 3 levels deep?
Post-#1221 the cap is depth=1 (worker threads can't spawn workers, sub-agents can't spawn sub-agents — see subagent_runner/ops.rs:237-251). Reading (a) → already covered, close. Reading (b) → conflicts with #1221's anti-recursion design, need to revisit.
Which one?