Skip to content

delegate_task model parameter silently discarded — subagents always inherit parent model #23467

@Anonso

Description

@Anonso

Bug Report

Description

The delegate_task tool accepts a model parameter in its JSON schema and Python function signature, but the parameter is never forwarded to child agents. Subagents always fall back to the parent agent model, making per-delegation model overrides impossible.

This affects both:

  1. Per-call model parameter — passed directly in delegate_task(model={"model": "xxx", "provider": "yyy"})
  2. Delegation configdelegation.model in config.yaml (via runtime_provider which returns a bundle without a model field)

Root Cause

In tools/delegate_tool.py (v0.12.0):

  1. The delegate_task() function signature does not include a model parameter
  2. The single-task dict is built without forwarding model to child agent construction
  3. _build_child_agent() has no task_model parameter for per-call model override
  4. The effective model resolution (model or parent_agent.model) ignores the task-level model entirely

Impact

  • Cannot route specific delegate_task calls to different models
  • delegation.model config option is silently ineffective
  • Users expecting model-aware delegation get unexpected parent-model fallback

Patch

A complete fix is available (31 lines added, 6 removed across tools/delegate_tool.py, touching 4 locations). Key changes:

  1. Add model parameter to delegate_task() signature and tool registry registration
  2. Forward model into the task_list dict
  3. Add task_model parameter to _build_child_agent()
  4. In _build_child_agent(), prioritize task_model over delegation config and parent model
  5. Clear the fallback chain when an explicit model is set

Environment

  • Hermes Agent v0.12.0
  • File: tools/delegate_tool.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/agentCore agent loop, run_agent.py, prompt builderduplicateThis issue or pull request already existstool/delegateSubagent delegationtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions