Skip to content

ACP mode: task tool cannot launch custom agents since 1.0.89 ("Unsupported native sessions host effect 'custom_agent_prompt'") #5030

Description

@DCarretero59

Describe the bug

In copilot --acp, the task tool cannot start any custom agent from ~/.copilot/agents. The call fails before the agent runs:

host interaction call failed: Error: Unsupported native sessions host effect 'custom_agent_prompt'

Built-in agents such as explore still work in the same session. The same custom agent works in copilot -p, and in copilot --acp 1.0.88 and earlier.

Version Mode Custom agent launch
1.0.86, 1.0.87-0, 1.0.88 --acp Works
1.0.89 --acp Fails
1.0.90 --acp Fails
1.0.89 -p Works
1.0.89, 1.0.90 --acp, built-in explore Works

Affected version

GitHub Copilot CLI 1.0.89 and 1.0.90

Steps to reproduce the behavior

  1. Create %USERPROFILE%\.copilot\agents\my-agent.agent.md:
    ---
    name: my-agent
    description: Test agent
    ---
    Reply with exactly: LAUNCHED
  2. Start copilot --acp and send initialize, then session/new.
  3. Send session/prompt asking the model to call the task tool once with agent_type: "my-agent".
  4. The tool_call_update for the task call has status failed and the error above.
  5. Repeat step 3 with agent_type: "explore". It completes.
  6. Repeat with copilot --acp --prefer-version 1.0.88. my-agent completes.

Expected behavior

The custom agent runs and returns its result, as it does in 1.0.88 and in copilot -p.

Additional context

  • Windows 11, x86_64. ACP over stdio from a Node client, no terminal emulator involved.
  • Possible cause, an inference from reading the bundled JavaScript and not confirmed: before 1.0.89, ACP sessions routed host effects to runNativeSessionHostEffect, which handles custom_agent_prompt. From 1.0.89, ACP goes through the native sessions server, and its clientSession/hostEffect path calls runServerHostEffect, which only handles server effects and throws for custom_agent_prompt. The version results above are tested.
  • Workaround: copilot --acp --prefer-version 1.0.88, when that version is cached.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:non-interactiveNon-interactive mode (-p), CI/CD, ACP protocol, and headless automation

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions