Skip to content

feat(agent-ui): actionable chat error messages (replace generic failures) #599

Description

@kovtcharov

Problem

When a chat message fails (Lemonade unreachable, model error, token limit exceeded, etc.), the user sees a generic error with no context about the cause or how to fix it. This is especially confusing when the user has dismissed the Lemonade warning banner and forgotten it was disconnected.

Current State

Example error messages shown today:

  • "Request failed" — from SSE stream failure
  • "Failed to create task. Is the server running?" — session creation error
  • Raw Python exception text in some cases

Proposed Solution

Map common failure modes to user-friendly, actionable messages:

Error Condition User-Facing Message
Lemonade unreachable "LLM server is not responding. Restart it with: lemonade-server serve"
No model loaded "No AI model is loaded. Download one with: gaia download --agent chat"
Context window exceeded "Message too long — the conversation history has reached the model's context limit. Start a new task."
Network timeout "The request timed out. Check that Lemonade is still running."
Generic 500 "An internal error occurred. Check the terminal for details."

Implementation Notes

  • Classify errors in ChatView.tsx based on HTTP status code + error message pattern
  • Show structured error card in chat with icon, message, and optional action button
  • Log full error to browser console for debugging

Acceptance Criteria

  • Each error type shows a distinct, actionable message
  • Error messages include a "Retry" or "Check again" action where appropriate
  • Raw exception text never shown to users
  • Error classification tested for the 5+ most common failure modes

Target: v0.17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentagent-uiAgent UI changesdomain:surfacesAgent UI, Telegram, WhatsApp, Slack/Discord, mobileenhancementNew feature or requestgood first issueGood for newcomerstrack:consumer-appConsumer product track — mobile-first: voice + messaging + memory + skillsuser-feedback

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions