hermes - ✅(Solved) Fix [Bug]: Add delegation.acp_command: none config option [3 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16816Fetched 2026-04-29 06:38:55
View on GitHub
Comments
1
Participants
2
Timeline
12
Reactions
0
Author
Participants
Timeline (top)
labeled ×5cross-referenced ×3referenced ×2closed ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root cause location: hermes-agent/tools/delegate_tool.py, lines 988-990

Fix Action

Fix / Workaround

Temporary workaround: Patch delegate_tool.py to clear acp_command when override_provider is set: python After effective_acp_args resolution (~line 991), add: if override_provider: effective_acp_command = None effective_acp_args = []

PR fix notes

PR #16839: fix(delegate): clear acp_command when override_provider is set

Description (problem / solution / changelog)

Problem

When delegation.provider is configured (e.g. minimax-cn), subagents inherited the parent's acp_command unconditionally. This caused run_agent.py to initialize CopilotACPClient, bypassing override credentials entirely and using its own default model (provider=copilot-acp model=qwen3.5-397b-a17b) instead of the configured delegation.provider and delegation.model.

Fix

When override_provider is set but override_acp_command is not explicitly provided, clear effective_acp_command and effective_acp_args so the child agent uses direct API calls with the configured provider credentials.

The existing override_acp_command path is unchanged — explicit ACP transport overrides still force provider=copilot-acp as before.

Fixes #16816

Changed files

  • tools/delegate_tool.py (modified, +8/-0)

PR #16882: fix: clear acp_command when delegation.provider is configured

Description (problem / solution / changelog)

Bug Description

When delegation.provider is configured in config.yaml (e.g., minimax-cn), subagents still inherit the parent's acp_command and use Copilot ACP transport instead of direct API calls. This causes subagents to use the wrong model and provider, bypassing the intended delegation.provider settings entirely.

Steps to Reproduce

  1. Configure delegation.provider: minimax-cn and delegation.model: MiniMax-M2.7 in config.yaml
  2. Start a lead agent that uses ACP transport (hermes --acp --stdio or similar)
  3. Spawn a subagent via delegate_task
  4. Observe the subagent's API calls — logs show provider=copilot-acp model=qwen3.5-397b-a17b instead of provider=minimax-cn model=MiniMax-M2.7

Expected Behavior

When delegation.provider is configured, subagents should use direct API calls with the configured provider's credentials (model, base_url, api_key). The parent's acp_command should NOT be inherited when a delegation provider override is set.

Actual Behavior

Subagent inherits the parent's acp_command unconditionally (delegate_tool.py:988-990):

effective_acp_command = override_acp_command or getattr(
    parent_agent, "acp_command", None
)

This causes the subagent to use Copilot ACP transport (provider=copilot-acp), whose default model is qwen3.5-397b-a17b — entirely ignoring the delegation.provider and delegation.model config.

Root Cause

In _build_child_agent(), the effective_acp_command is resolved from the parent before checking if override_provider is set. The existing comment in the code says:

When override_* params are set... the child uses those credentials instead of inheriting from the parent.

But this logic was not applied to acp_command, causing the ACP transport to override the intended delegation provider.

Fix

Clear effective_acp_command and effective_acp_args when override_provider is set. This ensures subagents use direct API calls when delegation.provider is configured.

Debug Report

Root cause location: hermes-agent/tools/delegate_tool.py, lines 988-990

Evidence from agent.log:

provider=copilot-acp model=qwen3.5-397b-a17b
Loaded env from /home/yeahlo/.hermes/profiles/coder/.env

Changed files

  • tools/delegate_tool.py (modified, +7/-0)

PR #16894: fix(delegate): clear acp_command when override_provider is set

Description (problem / solution / changelog)

Subagents now use direct API calls when delegation.provider is configured, instead of inheriting the parent's Copilot ACP transport.

Salvaged from #16839 by @ygd58 (buray). Duplicate PR #16882 by @YeahloYip fixed the same bug 2h18m later with a weaker guard that would nuke caller-supplied acp_command overrides; #16839's version correctly guards on not override_acp_command.

Changes

  • tools/delegate_tool.py: clear effective_acp_command / effective_acp_args when override_provider is set and no explicit override_acp_command was passed. Existing explicit ACP-override path is unchanged.

Validation

  • tests/tools/test_delegate.py: 120/120 passed
  • E2E resolution simulation covering four paths (delegation.provider only, no-override ACP parent, explicit ACP-override + provider, non-ACP parent) all behave as expected.

Fixes #16816.

Changed files

  • tools/delegate_tool.py (modified, +8/-0)

Code Example

Root cause location: hermes-agent/tools/delegate_tool.py, lines 988-990

    Credential resolution flow:
    1. _resolve_delegation_credentials() correctly resolves delegation.provider: minimax-cn → returns base_url, api_key, etc.
    2. These credentials are passed to _build_child_agent() as override_provider, override_base_url, override_api_key
    3. BUT effective_acp_command is resolved BEFORE the override check, so the parent's ACP transport is still inherited
    4. When acp_command is non-None, run_agent.py initializes CopilotACPClient which bypasses all the direct API credentials

    Evidence from agent.log:

    provider=copilot-acp model=qwen3.5-397b-a17b
    Loaded env from /home/yeahlo/.hermes/profiles/coder/.env


    The subagent loads the profile's .env but still uses Copilot ACP as transport, not direct API.

    Temporary workaround: Patch delegate_tool.py to clear acp_command when override_provider is set:
    python
    After effective_acp_args resolution (~line 991), add:
    if override_provider:
        effective_acp_command = None
        effective_acp_args = []

---
RAW_BUFFERClick to expand / collapse

Bug Description

When delegation.provider is configured in config.yaml (e.g., minimax-cn), subagents still inherit the parent's acp_command and use Copilot ACP transport instead of direct API calls. This causes subagents to use the wrong model and provider, bypassing the intended delegation.provider settings entirely.

Steps to Reproduce

1. Configure delegation.provider: minimax-cn and delegation.model: MiniMax-M2.7 in config.yaml
2. Start a lead agent that uses ACP transport (hermes --acp --stdio or similar)
3. Spawn a subagent via delegate_task
4. Observe the subagent's API calls — logs show provider=copilot-acp model=qwen3.5-397b-a17b instead of provider=minimax-cn model=MiniMax-M2.7

Expected Behavior

When delegation.provider is configured, subagents should use direct API calls with the configured provider's credentials (model, base_url, api_key). The parent's acp_command should NOT be inherited when a delegation provider override is set.

Actual Behavior

Subagent inherits the parent's acp_command unconditionally (delegate_tool.py:988-990):

python
effective_acp_command = override_acp_command or getattr(
    parent_agent, "acp_command", None
)


This causes the subagent to use Copilot ACP transport (provider=copilot-acp), whose default model is qwen3.5-397b-a17b — entirely ignoring the delegation.provider and delegation.model` config.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

N/A (CLI only), Telegram

Debug Report

Root cause location: hermes-agent/tools/delegate_tool.py, lines 988-990

    Credential resolution flow:
    1. _resolve_delegation_credentials() correctly resolves delegation.provider: minimax-cn → returns base_url, api_key, etc.
    2. These credentials are passed to _build_child_agent() as override_provider, override_base_url, override_api_key
    3. BUT effective_acp_command is resolved BEFORE the override check, so the parent's ACP transport is still inherited
    4. When acp_command is non-None, run_agent.py initializes CopilotACPClient which bypasses all the direct API credentials

    Evidence from agent.log:

    provider=copilot-acp model=qwen3.5-397b-a17b
    Loaded env from /home/yeahlo/.hermes/profiles/coder/.env


    The subagent loads the profile's .env but still uses Copilot ACP as transport, not direct API.

    Temporary workaround: Patch delegate_tool.py to clear acp_command when override_provider is set:
    python
    After effective_acp_args resolution (~line 991), add:
    if override_provider:
        effective_acp_command = None
        effective_acp_args = []

Operating System

wsl Ubuntu 24.04

Python Version

3.12.3

Hermes Version

v0.11.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Add a config option delegation.acp_command: none to opt out of ACP transport inheritance when delegation.provider is set. Or, automatically clear acp_command when override_provider is non-None (matching the existing comment intent in the code: "When override_* params are set...child uses those credentials instead of inheriting from the parent").

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

To fix the issue, update the delegate_tool.py to clear acp_command when override_provider is set, ensuring subagents use direct API calls with the configured provider's credentials.

Guidance

  • Identify the lines in delegate_tool.py where effective_acp_command is resolved and update the logic to check for override_provider before inheriting the parent's acp_command.
  • Verify the fix by checking the subagent's API calls in the logs to ensure they use the correct provider and model.
  • Consider adding a config option delegation.acp_command: none to opt out of ACP transport inheritance when delegation.provider is set.
  • Test the changes with different delegation.provider and delegation.model configurations to ensure the fix works as expected.

Example

if override_provider:
    effective_acp_command = None
    effective_acp_args = []

This code snippet should be added after the effective_acp_args resolution to clear acp_command when override_provider is set.

Notes

The proposed fix assumes that the override_provider check is sufficient to determine when to clear acp_command. Additional testing may be necessary to ensure this fix works in all scenarios.

Recommendation

Apply the workaround by patching delegate_tool.py to clear acp_command when override_provider is set, as this is a straightforward fix that addresses the root cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING