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
Target: v0.17.1
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 errorProposed Solution
Map common failure modes to user-friendly, actionable messages:
lemonade-server serve"gaia download --agent chat"Implementation Notes
ChatView.tsxbased on HTTP status code + error message patternAcceptance Criteria
Target: v0.17.1