az troubleshoot
Recover from saved command failures with AI.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az troubleshoot list |
List saved command failures locally. |
Core | Preview |
| az troubleshoot recover |
Recover from a saved command failure with AI. |
Core | Preview |
| az troubleshoot show |
Show the complete saved command and error locally. |
Core | Preview |
az troubleshoot list
List saved command failures locally.
List saved failures without AI. Output has id, command, and errorDetail fields, sorted by numeric PID ascending, then time and counter descending. Error detail is single-line and limited to 200 characters; use az troubleshoot show to read the complete error. It does not change or clean up history.
az troubleshoot list
Examples
List saved failures
az troubleshoot list --output table
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az troubleshoot recover
Recover from a saved command failure with AI.
Diagnose a saved failure using the same AI flow as automatic recovery. Without --id, select this terminal's latest saved failure, falling back to the global latest. Use an exact --id to select another record. The default style is oneshot. --style overrides agent.recovery.style for this invocation only.
az troubleshoot recover [--id]
[--style {oneshot, interactive}]
Examples
Recover from this terminal's latest saved failure
az troubleshoot recover
Select a failure
az troubleshoot recover --id $failureId
Use an interactive session for this recovery
az troubleshoot recover --id $failureId --style interactive
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Recover from this exact saved failure. Omit to select the latest saved failure in this terminal, then the global latest.
Override agent.recovery.style for this recovery only.
| Property | Value |
|---|---|
| Accepted values: | oneshot, interactive |
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az troubleshoot show
Show the complete saved command and error locally.
Read one saved failure by its exact ID without AI. Output has id, command, and errorDetail fields. Unlike list, show preserves the full original command and error text. It does not change or clean up history.
az troubleshoot show --id
Examples
Show the complete failure
az troubleshoot show --id $failureId --output table
Read the saved error with a query
az troubleshoot show --id $failureId --output json --query errorDetail
Required Parameters
Show this exact saved failure locally, including the complete command and error detail.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.