Improve agent error handling: prefer Bicep fixes over temporary workarounds#7063
Improve agent error handling: prefer Bicep fixes over temporary workarounds#7063hemarina merged 5 commits intoAzure:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates MCP prompt documentation used by azd agent mode to prioritize permanent infrastructure changes (Bicep/Terraform) over temporary workarounds when resolving provisioning and troubleshooting errors, aligning agent guidance with issue #6837.
Changes:
- Added an “IMPORTANT” policy section to both prompt docs to establish “infra-first” resolution priority and treat
azresource mutations as a last resort. - Reordered several existing error “solutions” to put Bicep fixes ahead of environment-variable workarounds.
- Added new provisioning error sections (role assignment immutability, Azure OpenAI TPM quota, If-Match precondition failures).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md | Adds infra-first guidance, reorders solution options, and introduces new common provisioning error sections. |
| cli/azd/internal/mcp/tools/prompts/azd_error_troubleshooting.md | Adds matching infra-first guidance to troubleshooting instructions for agent flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md
Outdated
Show resolved
Hide resolved
cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md
Outdated
Show resolved
Hide resolved
cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md
Outdated
Show resolved
Hide resolved
wbreza
left a comment
There was a problem hiding this comment.
📋 Code Review — PR #7063
Good improvements to the agent error handling prompts. The Bicep-first resolution priority is the right call — env var workarounds are temporary and get overridden on the next azd provision.
✅ What Looks Good
- Bicep-first resolution priority with clear Option 1 (Preferred) / Option 2 (Temporary) labeling
- Three new error sections covering real top errors from telemetry (Role Assignment, TPM Quota, If-Match)
- TPM Quota guidance correctly avoids requesting quota increases on behalf of the user
- Good alignment with the FAQ at learn.microsoft.com
Minor note: The IMPORTANT preamble is nearly duplicated across both files — consider extracting if these prompts evolve frequently.
Overall Assessment: Approve
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
…rounds (Azure#7063) * add cases for provision errors and make sure infra fix over az command * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * address feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rounds (Azure#7063) * add cases for provision errors and make sure infra fix over az command * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * address feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rounds (Azure#7063) * add cases for provision errors and make sure infra fix over az command * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * address feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rounds (Azure#7063) * add cases for provision errors and make sure infra fix over az command * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * address feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rounds (Azure#7063) * add cases for provision errors and make sure infra fix over az command * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * address feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rounds (Azure#7063) * add cases for provision errors and make sure infra fix over az command * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * address feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rounds (Azure#7063) * add cases for provision errors and make sure infra fix over az command * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * address feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
Improves agent error handling for provisioning error resolution to prefer permanent infrastructure fixes over temporary workarounds.
Addresses #6837
Changes
azd_provision_common_error.md
azd_error_troubleshooting.md