Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion tools/delegate_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ def _build_child_agent(

# When no explicit toolsets given, inherit from parent's enabled toolsets
# so disabled tools (e.g. web) don't leak to subagents.
parent_toolsets = set(getattr(parent_agent, "enabled_toolsets", None) or DEFAULT_TOOLSETS)
if toolsets:
child_toolsets = _strip_blocked_tools(toolsets)
# Intersect with parent — subagent must not gain tools the parent lacks
child_toolsets = _strip_blocked_tools([t for t in toolsets if t in parent_toolsets])
elif parent_agent and getattr(parent_agent, "enabled_toolsets", None):
child_toolsets = _strip_blocked_tools(parent_agent.enabled_toolsets)
else:
Expand Down Expand Up @@ -259,6 +261,14 @@ def _run_single_child(
"""
child_start = time.monotonic()

# Log the model/provider the subagent is running on
_child_model = getattr(child, "model", None)
_child_provider = getattr(child, "provider", None)
if _child_model:
provider_tag = f" ({_child_provider})" if _child_provider else ""
logger.info("[subagent-%d] spawning with model=%s%s", task_index, _child_model, provider_tag)
print(f" [subagent-{task_index}] model={_child_model}{provider_tag}")

# Get the progress callback from the child agent
child_progress_cb = getattr(child, 'tool_progress_callback', None)

Expand Down
Loading