Explain a failed command
Ask Kubexy why a command failed and get fix commands you can insert at the prompt.
Explain a failed command
When a command fails, Kubexy can tell you what went wrong, why, and what to run to fix it.
Ask for an explanation
A command that exits with an error gets a red bar in the margin. Then either:
- hover over its output and click ✨ Explain at the right, or
- right-click inside its output, or click its red bar, and choose Explain this error.
A panel opens next to the command with:
- What went wrong, in a sentence or two
- Likely cause
- Suggested fix: one or more commands, each with Insert and Copy
Insert puts a fix on the prompt without running it, so you can review it first. Kubexy never runs a fix itself.
Esc, or the close button, closes the panel. Closing it while Kubexy is still answering cancels the request. A finished answer is kept, so reopening the same command shows it again without asking.
What gets sent
Kubexy receives the command, its exit code and its output, along with the same context as the command bar: operating system, shell, local or SSH, and your last few commands. Long output is cut to about 8 KB, keeping the beginning and the end.
Command output can contain sensitive data. Before sending, Kubexer masks obvious secrets: private keys, AWS keys, bearer tokens, JWTs, and values such as password=… or token: …. The panel's footer names the AI provider the output went to.
Requirements
- Command blocks need Kubexer's shell integration, so this works in bash and zsh, locally and over SSH. See Command blocks.
- Explaining errors is part of Kubexy, a Pro feature, and uses the provider and API key from Settings → Kubexy.
Related
Kubexy in the terminal · Ask Kubexy for a command · Command blocks