You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delegation framework (HierarchicalAgent/DelegateTool) is unwired — no production caller #11207
The hierarchical delegation framework is fully scaffolded but has no production caller:
agents/hierarchical_agent.pyHierarchicalAgent — only instantiated within its own _create_subordinate (and a docstring example); nothing constructs a root and runs it.
tools/delegate_tool.pyDelegateTool — returns {"error": "no_hierarchical_agent"} unless injected with a HierarchicalAgent, and nothing injects one.
chat_workflow/models.pyAgentContext.create_subordinate_context / create_child — zero production callers.
The delegate tool in chat_workflow/tool_handler.py only records pending_delegation; nothing consumes it to spawn a subagent.
So delegated multi-agent execution does not happen in production, and governance keyed on a subagent identity (#11159) has nothing to bind to.
Action
Decide: wire the delegation framework into a real execution path, or remove it as dead scaffolding. If wired, stamp the subordinate AgentContext.agent_id with a governed profile id so #11145 forbidden_work enforcement applies to delegated work.
Related: same "wired-but-never-triggered" pattern as AgentLoop (see #11145/#11175) and the dormant chat approval-interrupt (#11202).
Completed. The delegate tool is now wired to an isolated, provider-agnostic governed subagent runner (chat_workflow/delegation.py), flag-gated OFF by default (AUTOBOT_DELEGATION_ENABLED).
PR1 — #11213 (sub-task #11214): runner + _ENGINES registry + claude_code engine (external autonomous agent, governed via --disallowedTools mapped from the profile's forbidden_work; _handle_delegate_tool → async generator, record-only when off).
PR2 — #11215: internal engine (AutoBot's own LLM driving _execute_llm_continuation_loop with a governed LLMIterationContext; tools funnel through _dispatch_tool_call → _enforce_forbidden_work for free; in-process delegation_depth bounding).
Both engines give the subordinate agent autonomy and backend-enforced oversight. Follow-up #11216 tracks moving _current_lightweight_mode onto ctx for full singleton isolation (cosmetic, latent).
Filed #17286 for the remainder: the delegatetool name was rewired to chat_workflow/delegation.py, but the two modules this issue is named after are still present with no production caller.
HierarchicalAgent( appears only at agents/hierarchical_agent.py:57,135 (creating its own subordinates) and in agents/subordinate_delegation_test.py. tools/delegate_tool.py declares name = "delegate" (:52) and is constructed nowhere outside tests, returning "Delegation not available in current context" when its hierarchical_agent is unset.
Per the no-deletion rule #17286 treats this as consolidation — the recursive-subordinate model has no equivalent in the live runner and should be folded in or explicitly retired, not dropped.
Activity
refactor(delegation): restore reason log, document depth metadata, ad…
feat(delegation): wire delegate tool to governed subagent runner, fla…
docs(delegation): note shared-singleton reliance in internal engine (#…
feat(delegation): add governed internal-LLM engine, provider-agnostic…
github-actions commentedon Jul 7, 2026
PR #11215 (merged to
Dev_new_gui) references this issue with a close keyword.If this issue is fully resolved, close it manually. If work remains, no action is needed.
mrveiss commentedon Jul 7, 2026
Completed. The
delegatetool is now wired to an isolated, provider-agnostic governed subagent runner (chat_workflow/delegation.py), flag-gated OFF by default (AUTOBOT_DELEGATION_ENABLED).PR1 — #11213 (sub-task #11214): runner +
_ENGINESregistry + claude_code engine (external autonomous agent, governed via--disallowedToolsmapped from the profile'sforbidden_work;_handle_delegate_tool→ async generator, record-only when off).PR2 — #11215: internal engine (AutoBot's own LLM driving
_execute_llm_continuation_loopwith a governedLLMIterationContext; tools funnel through_dispatch_tool_call→_enforce_forbidden_workfor free; in-processdelegation_depthbounding).Both engines give the subordinate agent autonomy and backend-enforced oversight. Follow-up #11216 tracks moving
_current_lightweight_modeonto ctx for full singleton isolation (cosmetic, latent).Closing as done.
mrveiss commentedon Sep 22, 2026
Filed #17286 for the remainder: the
delegatetool name was rewired tochat_workflow/delegation.py, but the two modules this issue is named after are still present with no production caller.HierarchicalAgent(appears only atagents/hierarchical_agent.py:57,135(creating its own subordinates) and inagents/subordinate_delegation_test.py.tools/delegate_tool.pydeclaresname = "delegate"(:52) and is constructed nowhere outside tests, returning "Delegation not available in current context" when itshierarchical_agentis unset.Per the no-deletion rule #17286 treats this as consolidation — the recursive-subordinate model has no equivalent in the live runner and should be folded in or explicitly retired, not dropped.