Skip to content

[Hosted Agent][azd CLI] Deployment stuck at "Create/Update capability host" when using an existing Foundry Project #455

@hyogrin

Description

@hyogrin

When registering a Hosted Agent via Azure Container Registry using the Azure Developer CLI (azd), the deployment gets stuck in a pending state at the "Create/Update capability host" step.

This issue occurs only when reusing an existing Azure AI Foundry Resource and Foundry Project where a capability host already exists.

If the same workflow is executed by creating a brand-new Foundry Resource and Foundry Project from scratch, the deployment completes successfully.

Documentation Followed
The deployment was executed exactly as described in the official documentation:
https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/hosted-agents?view=foundry&tabs=cli#create-a-hosted-agent-by-using-the-azure-developer-cli
No steps were skipped or modified.

Environment
Deployment Method: Azure Developer CLI (azd)
Agent Type: Hosted Agent (container-based, ACR-backed)
Container Registry: Azure Container Registry (ACR)
Azure AI Foundry Resource: Existing
Azure AI Foundry Project: Existing
Capability Host: Already created, I also tried after deleting the previous Capability Host once
Authentication: azd logged in with sufficient permissions

Steps to Reproduce
Create an Azure AI Foundry Resource and Foundry Project.
Create a capability host in the Foundry Project (successfully).
At a later time, attempt to register a new Hosted Agent using:
azd up

Actual Result
(✓) Done: Resource group: msfoundry-rg (2.499s)
(✓) Done: Foundry: foundry-lhnjfq (20.509s)
(✓) Done: Azure AI Services Model Deployment: foundry-lhnjfq/gpt-4o-mini (1.46s)
(✓) Done: Log Analytics workspace: logs-upxjfukq2bpkg (24.225s)
(✓) Done: Foundry project: foundry-lhnjfq/msfoundry-prj1 (9.351s)
(✓) Done: Application Insights: appi-upxjfukq2bpkg (4.351s)
(✓) Done: Container Registry: crupxjfukq2bpkg (21.489s)
| | Creating/Updating resources (Foundry capability host)
|= | Creating/Updating resources (Foundry capability host)
|== | Creating/Updating resources (Foundry capability host)
|=== | Creating/Updating resources (Foundry capability host)
| | Creating/Updating resources (Foundry capability host)
|= | Creating/Updating resources (Foundry capability host)
|== | Creating/Updating resources (Foundry capability host)
|== | Creating/Updating resources (Foundry capability host)^C(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions