-
Notifications
You must be signed in to change notification settings - Fork 2
Troubleshooting
Copilot provider: The default provider (copilot) connects to api.enterprise.githubcopilot.com. Failures typically indicate that GitHub Copilot is not enabled for the user's organization or that the authentication token has expired. The default model is claude-sonnet-4 with a 480-second timeout. Dynamic model discovery via the /models endpoint supports Claude, GPT, and Gemini families. For large prompts, increase the timeout via set COPILOT_TIMEOUT=600.
GitHub Models provider: Requires a valid GitHub personal access token configured in prototype.secrets.yaml under ai.github_models.api_key. Verify the token has appropriate scopes and has not expired.
Azure OpenAI provider: Requires an Azure OpenAI endpoint and API key. Verify the endpoint URL, API key, and deployment name in the project configuration. Connection issues often stem from incorrect endpoint formatting or expired keys.
To check current AI configuration:
az prototype config get --key ai.providerTo switch providers:
az prototype config set --key ai.provider --value copilotTerraform not installed: The build and deploy stages require Terraform when iac_tool is set to terraform. Install via terraform.io and ensure the terraform binary is on your PATH.
Bicep not installed: Required when iac_tool is set to bicep. Install via az bicep install or download from the Bicep releases.
GitHub CLI not installed: Required for GitHub-based backlog generation push operations. Install from cli.github.com.
Azure DevOps extension not installed: Required for Azure DevOps backlog push operations. Install via az extension add --name azure-devops.
If prototype.yaml contains legacy DefaultStr YAML tags, the config parser may fail. This typically occurs after upgrading from an earlier version. To resolve:
- Open
prototype.yamlin a text editor - Remove any
!DefaultStror similar custom tags - Save and retry the command
Build failures trigger the QA remediation loop automatically. After the QA agent reviews generated code and finds issues, the system:
- Identifies affected stages from the QA output
- Regenerates those stages with QA findings appended as fix instructions
- Re-runs QA review on the remediated code
- Reports only remaining issues
If issues persist after remediation, they are tracked via the escalation system.
Deploy failures route to the QA agent for diagnosis (see Error Analysis). Common deployment issues include:
-
Preflight check failures: Missing Azure CLI login, incorrect subscription, missing resource providers. Run
az prototype deploy --statusto see preflight results. -
Terraform/Bicep errors: Syntax errors, API version mismatches, resource conflicts. Check the generated code in the project's
infra/directory. - Timeout issues: Large deployments may exceed default timeouts. Check Azure deployment status in the portal.
Rollback is available for failed deployments, with ordered enforcement -- you cannot rollback stage N while stage N+1 is still deployed. Use az prototype deploy --rollback-info to see rollback instructions.
Subscription access: Verify you have Contributor or Owner role on the target subscription. Run az account show to confirm the active subscription.
Cross-tenant deployment: Use --tenant to specify the target tenant ID. For service principal authentication, provide --service-principal along with --client-id, --client-secret, and --tenant-id. Credentials route to prototype.secrets.yaml automatically.
Tenant mismatch: The deploy preflight checks warn if the active Azure CLI tenant differs from the target tenant configured in the project.
az prototype status --detailedShows per-stage status across all stages (init, design, build, deploy) with expanded details.
az prototype design --statusShows current discovery status: open items, confirmed items, scope decisions (in-scope, out-of-scope, deferred).
az prototype build --statusShows current build progress: completed stages, pending stages, and any recorded issues.
az prototype deploy --statusShows current deployment progress: deployed stages, failed stages, preflight results.
az prototype deploy --outputsShows captured deployment outputs from Terraform or Bicep (resource IDs, endpoints, connection strings).
az prototype deploy --rollback-infoShows rollback instructions based on deployment history, including which stages can be safely rolled back.
When a stage is in a bad state, you can reset it and start fresh:
az prototype design --resetClears design state (discovery conversation, architecture output) and starts fresh. Does not affect build or deploy state.
az prototype build --resetClears build state (generated code, QA results, deployment plan) and starts fresh. Does not affect design state but deploy state may become stale.
az prototype deploy --resetClears deploy state (deployment history, captured outputs, rollback tracking) and starts fresh. Does not destroy deployed Azure resources -- only clears local tracking state.
Switching between Terraform and Bicep after the build stage requires resetting the build state (az prototype build --reset) and rebuilding. The design stage is IaC-agnostic, so design state is preserved. Change the IaC tool via:
az prototype config set --key iac_tool --value bicep
az prototype build --reset
az prototype buildYes. Change the provider at any time:
az prototype config set --key ai.provider --value copilotConfigure provider-specific settings (API keys, endpoints) in prototype.secrets.yaml or via az prototype config set. Existing stage state is preserved -- the new provider is used for subsequent AI calls.
All stages are re-entrant. Simply run the stage command again:
az prototype design # Re-enters discovery or regenerates architecture
az prototype build # Resumes or re-runs build
az prototype deploy # Re-runs deploymentTo force a completely fresh start for a stage, use --reset first.
-
Project config:
prototype.yamlandprototype.secrets.yamlin the project root -
State files:
.prototype/state/directory (design, build, deploy, backlog, escalation YAML files) -
Generated infrastructure: project root, typically in
infra/or stage-specific directories - Generated application code: project root, in service-specific directories
-
Custom agents:
.prototype/agents/directory -
Custom MCP handlers:
.prototype/mcp/directory
For automated or cross-tenant deployments:
az prototype deploy \
--service-principal \
--client-id <app-id> \
--client-secret <secret> \
--tenant-id <tenant-id>Alternatively, configure credentials in prototype.secrets.yaml:
deploy:
service_principal:
client_id: "<app-id>"
client_secret: "<secret>"
tenant_id: "<tenant-id>"Then deploy with just the flag:
az prototype deploy --service-principalFor detailed diagnostic information, enable debug logging:
# Windows
set DEBUG_PROTOTYPE=true
az prototype design --context "..."
# Linux/macOS
DEBUG_PROTOTYPE=true az prototype design --context "..."This creates a timestamped log file debug_YYYYMMDDHHMMSS.log in the project directory. The log captures:
- Session context: Python version, OS, AI provider, model, timeout, project path
- Every AI call: system message sizes, user content (first 2000 chars), model, temperature, max_tokens
- Every AI response: elapsed time, response content (first 2000 chars), token counts
- Every state mutation: topic status changes, discovery state saves
- Every decision branch: reentry vs fresh path, context hash matches, artifact deltas
- Every slash command: command name, current topic, exchange count
- Every error: full Python traceback
See Debug Logging for the full format reference.
File issues at the repository: Azure/azext-prototype
Include the following in bug reports:
- Output of
az prototype status --detailed - The stage and command that failed
- Error messages or log output
- Azure CLI version (
az version) - Debug log file (if available) — see Debug Logging above
- Error Analysis -- AI-powered error diagnosis
- Escalation -- automated escalation chain for blocked tasks
- Knowledge System -- runtime documentation and web search
- MCP Integration -- external tool configuration issues
Getting Started
Stages
Interfaces
Configuration
Agent System
Features
- Backlog Generation
- Cost Analysis
- Error Analysis
- Docs & Spec Kit
- MCP Integration
- Knowledge System
- Escalation
Quality
Help
Policies — Azure
AI Services
Compute
Data Services
- Azure SQL
- Backup Vault
- Cosmos Db
- Data Factory
- Databricks
- Event Grid
- Event Hubs
- Fabric
- IoT Hub
- Mysql Flexible
- Postgresql Flexible
- Recovery Services
- Redis Cache
- Service Bus
- Stream Analytics
- Synapse Workspace
Identity
Management
Messaging
Monitoring
Networking
- Application Gateway
- Bastion
- CDN
- DDoS Protection
- DNS Zones
- Expressroute
- Firewall
- Load Balancer
- Nat Gateway
- Network Interface
- Private Endpoints
- Public Ip
- Route Tables
- Traffic Manager
- Virtual Network
- Vpn Gateway
- WAF Policy
Security
Storage
Web & App
Policies — Well-Architected
Reliability
Security
Cost Optimization
Operational Excellence
Performance Efficiency
Integration