The SDK message format (how Claude Code describes a conversation to a program driving it) gains an internal local_command_outcome field on rows recording local commands. Its kinds are:
unavailable_headless
unknown, with a suggestion of the closest command
failed
restart_required
Why
A program showing the conversation can offer a fix, such as a corrected command name, instead of just passing the error text along.