Skip to content

Desktop app fails on startup: agx serve failed to start (local API not available) #2

Description

@clawbundle

Description

Summary

When launching AgenticX Desktop (Electron + Vite dev flow), the app shows an error dialog and fails to start the local backend. The UI loads in the browser at http://localhost:5173, but the desktop shell reports that the agx CLI could not be started.

Error message

  • Title (localized): AgenticX Desktop 启动失败
  • Body (localized): 无法启动本地服务,请检查 agx 是否可用。
  • Technical: Error: agx serve failed to start

Expected behavior

Either:

  1. The desktop app should start successfully when following the documented setup, or
  2. Prerequisites (installing agx, PATH configuration) should be clearly documented before first run, with a actionable error (e.g. “install agx from …”, “add … to PATH”).

Actual behavior

Startup fails with the above error. Vite reports as ready (http://localhost:5173/), but the Electron side cannot spawn or keep agx serve running.

Steps to reproduce

  1. Clone the repository and install dependencies under desktop/ (npm install).
  2. Start the dev workflow (e.g. npm run dev or the documented desktop dev command).
  3. Open the app; observe the error dialog on startup.

Environment

  • OS: Windows 10/11 (Git Bash / MINGW64)
  • Node / npm: (fill in your versions, e.g. node -v, npm -v)
  • Branch: main
  • agx: (e.g. agx --version or “not installed / not on PATH”)

Additional context

  • The Electron main process appears to run something equivalent to:
    agx serve --host 127.0.0.1 --port <port>.
  • If agx is missing from PATH in the environment Electron inherits, or the binary is not installed, startup will fail with this message.

Suggestions (optional)

  • Document how to install agx and verify agx is on PATH for GUI-launched processes on Windows.
  • Consider detecting missing agx early and surfacing stderr from the spawn attempt in the dialog or logs.
  • Optionally support a configurable path to the agx executable for dev setups.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions