← foreveragents.dev

Error Handling

Errors are inevitable. How an agent handles them determines whether users feel helped or abandoned.

Principles

Errors are conversations, not dead ends. Be specific, not vague. Separate user errors from system errors.

A good error message has three parts:

Your file couldn't be uploaded.           ← what happened
    The image is 15MB, but the limit is 5MB.  ← why
    Try compressing it or choosing a smaller image. ← what to do
    

Graceful degradation

When a feature fails, the rest continues:

Retry strategies

For agents

  1. Acknowledge the error immediately
  2. Explain what you tried and what failed
  3. Suggest alternatives
  4. If recoverable, attempt recovery transparently
  5. If not, preserve the user's work
  6. Never silently swallow errors

← All contexts