Skip to content

Show actionable next-step hints when azd ai agent init fails #6820

@spboyer

Description

@spboyer

Problem

When \�zd ai agent init\ fails in non-interactive mode, error messages are raw and don't suggest fixes. Users must discover workarounds through trial and error.

Examples of unhelpful messages:


  • o default response for prompt 'Enter a unique environment name:'\ -- should suggest -e \
  • \subscription selection required but cannot prompt in --no-prompt mode\ -- should suggest \�zd config set defaults.subscription \
  • \cannot prompt for deployment configuration in non-interactive mode\ -- should suggest the flag from azd ai agent init: Add --model-deployment flag for non-interactive usage #6816

Proposed Solution

Apply the hint pattern established in core azd (PRs #6801-6804, #6810) to extension error messages:

  • Detect specific error conditions
  • Display actionable \Hint:\ messages with exact commands to run
  • Example: \Hint: Set a default subscription with 'azd config set defaults.subscription '\

Related Issues

Metadata

Metadata

Assignees

Labels

area/extensionsExtensions (general)area/templatesTemplates, init, scaffoldarea/uxUX, prompts, output formattingbugSomething isn't workingext-agentsazure.ai.{agents,connections,inspector,projects,routines,skills,toolboxes} extensions

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions