Skip to content

feat: delegate_task ACP transport override — spawn ACP child agents from non-ACP parent #2653

@simplenamebox-ops

Description

@simplenamebox-ops

Problem

Currently, delegate_task inherits acp_command and acp_args from the parent agent with no override option:

effective_acp_command = getattr(parent_agent, "acp_command", None)
effective_acp_args = list(getattr(parent_agent, "acp_args", []) or [])

This means:

  • If parent is running via Discord/Telegram/CLI (no ACP), children cannot use ACP transport
  • You cannot spawn a child with a different transport than the parent

Use Case

From Discord, I want to delegate a task to a child agent running over ACP (e.g., claude --acp --stdio or copilot --acp --stdio) to get a different model/personality in a sub-thread.

Specific Use Case: Claude Code Max Subscription

I have a Claude Code Max OAuth subscription (claude.ai/code). This gives me access to the Claude Code CLI (claude --acp --stdio) which provides:

  • Full agentic loop with file editing, terminal, reasoning
  • Uses my Max subscription quota (not API credits)
  • Native ACP protocol support

Current workflow in OpenClaw:

"can you spawn claude acp in sub thread"

Results in a new Discord thread with Claude Opus 4.6 running autonomously via ACP.

What I want in Hermes:

delegate_task(
    goal="Refactor this codebase for better testability",
    acp_command="claude",  # Uses my Claude Code Max subscription
    acp_args=["--acp", "--stdio"],
)

This would:

  1. Spawn Claude Code subprocess via ACP protocol
  2. Claude Code uses Max plan quota (OAuth-authenticated)
  3. Child runs autonomous agentic loop
  4. Returns summary to parent

Proposed Solution

Add acp_command and acp_args parameters to delegate_task tool schema:

def _build_child_agent(
    ...
    override_acp_command: str = None,
    override_acp_args: list[str] | None = None,
    ...
):
    effective_acp_command = override_acp_command or getattr(parent_agent, "acp_command", None)
    effective_acp_args = list(override_acp_args or getattr(parent_agent, "acp_args", []) or [])

Tool schema addition:

{
  "name": "acp_command",
  "type": "string",
  "description": "Override ACP command for child (e.g., 'claude', 'copilot'). If set, child uses ACP transport."
},
{
  "name": "acp_args",
  "type": "array",
  "items": {"type": "string"},
  "description": "ACP command arguments (default: ['--acp', '--stdio'])"
}

Current Workarounds

Approach Works? Notes
delegate_task(provider="anthropic", model="claude-opus-4-6") Requires Anthropic API key (separate from Claude Code Max)
delegate_task(provider="copilot") Uses Copilot HTTP API, not ACP transport
delegate_task(toolsets=["mcp"]) Child inherits parent MCP servers
Spawn Claude Code via ACP Needs this feature

Related

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/acpAgent Communication Protocol adaptertool/delegateSubagent delegationtype/featureNew feature or request

    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