Skip to content

[BUG] Sub-agent model configuration is ignored, causing persistent context window errors #12440

@samboneym

Description

@samboneym

Bug Description

The delegate_task tool consistently fails to honor the specified model for sub-agents, defaulting to a model with an insufficient context window (qwen/qwen-2.5-coder-32b-instruct), which results in repeated context_length errors. This blocks any task that relies on sub-agent delegation.

Steps to Reproduce

  1. Call delegate_task with any number of tasks.
  2. The sub-agents will fail with the error: Model qwen/qwen-2.5-coder-32b-instruct has a context window of 32,768 tokens, which is below the minimum 64,000 required by Hermes Agent.

Attempts to Resolve

The following methods have been attempted to force the sub-agents to use a model with a larger context window (e.g., anthropic/claude-3-haiku), all of which have failed:

  1. acp_command and acp_args: Explicitly setting the model in the delegate_task call using acp_command='hermes' and acp_args=['--model', 'anthropic/claude-3-haiku'].
  2. HERMES_MODEL Environment Variable: Setting the HERMES_MODEL environment variable to anthropic/claude-3-haiku before calling delegate_task.
  3. config.yaml Modification: Directly editing $HERMES_HOME/config.yaml to set delegation.model to anthropic/claude-3-haiku.

None of these methods have been successful. The sub-agents continue to default to the qwen model, which suggests the delegation configuration is being ignored or overridden at a deeper level.

Expected Behavior

Sub-agents should use the model specified in config.yaml, the HERMES_MODEL environment variable, or the acp_args of the delegate_task call.

Actual Behavior

Sub-agents ignore all configuration and default to a model with an insufficient context window, causing all delegation tasks to fail.

Impact

This is a high-priority issue as it completely blocks the use of the delegate_task tool, which is critical for performing complex and parallel tasks. This prevents the completion of assigned cron jobs and other multi-step operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundarea/configConfig system, migrations, profilessweeper:implemented-on-mainSweeper: behavior already present on current maintool/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