[azd ai] Surface hosted-agent deployment failures and logs in the CLI
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
## Customer problem
When Foundry builds and deploys a hosted-agent image, the deployment can fail before the agent becomes active or creates a session. In this state, developers receive little or no actionable diagnostic information.
Existing runtime monitoring is session-oriented, so it does not help when provisioning fails before a session exists. In one customer case, a private ACR DNS-resolution failure took days to isolate because the CLI could not surface the underlying image-pull error.
## Requested CLI experience
`azd ai` should:
- Follow the deployment operation until the agent becomes active or the deployment fails.
- Surface backend build, provisioning, image-pull, networking, and startup errors without requiring an active session.
- Return a non-zero exit code when deployment fails.
- Provide stable output suitable for CI/CD logs and automation.
- Include correlation information that can be used with backend or Application Insights diagnostics.
## Expected outcome
A developer running an `azd ai` deployment can determine why a hosted agent failed to activate directly from the CLI or its CI/CD logs.
## Dependency
This requires the Foundry backend to expose deployment-stage status and diagnostics. Related internal Vienna work item: https://dev.azure.com/msdata/Vienna/_workitems/edit/5578398
Contributor guide
Research direction
Start at the `azd ai` deployment entry point and review how deployment status is currently followed and reported. Coordinate with the Foundry backend dependency for deployment-stage diagnostics; done means failures surface actionable build, provisioning, image-pull, networking, or startup details, include correlation information, and return a non-zero exit code with stable CI/CD output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- cli, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100