Describe the issue:
While testing the Key Vault resource name conflict scenario, executing the azd provision command resulted in a conflict error indicating that the Key Vault name already exists, as shown in the image below.


At this point, agent mode offered three solutions. Selecting Yes. Choose a new, globally unique Key Vault name for deployment. only updated the .azure/mh8/.env file; the hard-coded name in the main.bicep file remained unchanged, causing the deployment to fail with the same VaultAlreadyExists error.



Subsequently, selecting Yes, let agent mode choose the best approach also failed to resolve the issue, and the process ultimately exited as shown in the image below.


Repro Steps:
- Run
git clone https://github.com/Azure/azure-dev.git -b errorhandlingUpdates.
- Run
cd cli/azd
- Run
go build command to build a azd.exe file.
- Run
./azd config set ai.agent.model.type github-copilot and ./azd config set alpha.llm on
- Create a new folder named
todo-nodejs-mogno and cd todo-nodejs-mogno, then run azd init -t todo-nodejs-mongo.
- Modify the value of
name in the keyVault module file within the main.bicep folder to an existing KeyVault name.
- Copy the
azd.exe file just built to the current directory, then run ./azd provision.
Environment:
Expected behavior:
The agent mode should be able to automatically resolve resource name conflicts.
@hemarina for notification.
Describe the issue:


While testing the
Key Vault resource name conflictscenario, executing theazd provisioncommand resulted in a conflict error indicating that the Key Vault name already exists, as shown in the image below.At this point, agent mode offered three solutions. Selecting



Yes. Choose a new, globally unique Key Vault name for deployment.only updated the.azure/mh8/.envfile; the hard-coded name in themain.bicepfile remained unchanged, causing the deployment to fail with the sameVaultAlreadyExistserror.Subsequently, selecting


Yes, let agent mode choose the best approachalso failed to resolve the issue, and the process ultimately exited as shown in the image below.Repro Steps:
git clone https://github.com/Azure/azure-dev.git -b errorhandlingUpdates.cd cli/azdgo build commandto build a azd.exe file../azd config set ai.agent.model.type github-copilotand./azd config set alpha.llm ontodo-nodejs-mognoandcd todo-nodejs-mogno, then runazd init -t todo-nodejs-mongo.namein thekeyVault modulefile within themain.bicepfolder to an existing KeyVault name.azd.exefile just built to the current directory, then run./azd provision.Environment:
Expected behavior:
The agent mode should be able to automatically resolve resource name conflicts.
@hemarina for notification.