Skip to content

Microsoft Foundry: Deploy Hosted Agent command is giving error "cannot create a new Capability Host with name" on VS code AI Toolkit #376

@karun19

Description

@karun19

Does this occur consistently? Yes
Repro steps:

Create an hosted agent(single agent) using Microsoft Foundry: Create new Hosted Agent command on VS code
Deploy agent to foundry using Microsoft Foundry: Deploy Hosted Agent command
Action: deploy-hosted-agent
Error type: 500
Error Message: 500: There is an existing Capability Host with name: agents, provisioning state: Succeeded for workspace: 95d97546-f67e-4555-8f77-8d2cead802c0/msfoundry-poc/roshfoundry@AML/accountcaphost, cannot create a new Capability Host with name: accountcaphost for the same ClientId.

Version: 0.18.0
OS: win32
OS Arch: x64
OS Release: 10.0.26100
Product: Visual Studio Code
Product Version: 1.109.4
Language: en
UTC time: Wed, 08 Apr 2026 05:07:13 GMT

Call stack:
AIFServiceClientV2.handleResponse extension.js:164885:19
AIFServiceClientV2.createCapabilityHost extension.js:164936:21
async ProjectService.createCapabilityHostWithRetry extension.js:184793:24
async ProjectService.tryCreateCapabilityHost extension.js:184758:24
async AgentLifecycleHelper.handleCapabilityHostCreation extension.js:181077:32
async AgentLifecycleHelper.ensureCapabilityHostReady extension.js:181056:16
extension.js:181094:27extension.js:181094:27

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs attentionThe issue needs contributor's attention

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions