Skip to content

feat: better error UX — actionable messages with fix commands #278

Closed

Description

@hurttlocker

Problem

When config is missing or keys are invalid, errors can be cryptic Go output. New users don't know what to do next.

Proposal

Audit all user-facing error paths and ensure they:

  1. Say what's wrong in plain English
  2. Say exactly how to fix it (include the command to run)
  3. Never show raw Go stack traces for expected errors

Examples:

  • Error: no LLM provider configured. Run 'cortex init' or set llm.provider in ~/.cortex/config.yaml
  • Error: GROK_API_KEY not set. Run 'cortex config set llm.apiKey <your-key>' or export GROK_API_KEY=<key>
  • Error: embed model 'ollama/nomic-embed-text' not reachable. Is Ollama running? Try 'ollama serve' first.
  • Warning: binary v1.2.0 but config was written by v1.3.0 — run 'cortex doctor' to check compatibility

Acceptance Criteria

  • All common first-run errors have actionable messages
  • No raw panics or stack traces for expected config issues
  • cortex doctor catches and explains version/config drift
  • Error messages include the exact fix command when possible

Part of the v1.3 adoption sprint.

Activity

  1. added
    enhancement
    on Mar 1, 2026
  2. added 2 commits that reference this issue on Mar 1, 2026
    cb3d243
    400b923
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions