SDK errors fall into four categories.
The CLI subprocess could not start, disconnected, or returned invalid JSON.
Common causes:
AUTOHAND_CLI_PATHpoints to a missing binary.- The CLI is not authenticated.
- The provider config is invalid.
Requests time out according to Config::timeout.
auto config = autohand::Config::from_environment();
config.timeout = std::chrono::milliseconds(120000);The CLI rejected a request. Examples:
- calling a control method before
start(); - sending an expired permission request id;
- setting an unsupported model.
Agent loop failures may arrive as error events in the stream. Handle them in your event callback and show enough context for users to recover.
- Stop and restart the SDK after transport failures.
- Use
interrupt()orRun::abort()for user cancellation. - Keep final summaries honest when checks fail.
- Keep raw event JSON available for debugging advanced CLI behavior.