Skip to main content

AI Analysis

中文版

cosh can review command failures and useful diagnostic output, then suggest a next step or start an Agent analysis. The analysis mode controls proactive help; an explicit Agent request is still available in every mode.

Choose a mode

Set the mode at runtime with /mode analysis <mode> or in shell.analysis_mode.

ModeBehavior
smartDefault. Evaluate failures and diagnostic output, then show useful insights for review.
autoAutomatically start analysis only for a narrow set of high-confidence failures; other cases remain suggestions.
manualDisable proactive suggestions, failure insights, automatic analysis, and personalized prompt recommendations. Request analysis explicitly when needed.

Examples:

/mode analysis smart
/mode analysis auto
/mode analysis manual

What to expect

  • A failed command does not always start an Agent request. cosh first checks whether the failure is actionable and the available evidence is reliable.
  • A suggestion or action card lets you decide whether to analyze; choose Skip to leave the command result unchanged.
  • Analysis uses the command, exit status, and a bounded output excerpt. The result is streamed in the terminal.
  • Press Ctrl+C to cancel an analysis that is in progress.

Configure the default mode with:

[shell]
analysis_mode = "smart"

See Interactive commands for the other slash commands and Configuration for environment overrides.