Skip to content

fix(daemon): host-API skew tells users to run gaia daemon restart, which cannot fix it #2710

Description

@kovtcharov

src/gaia/daemon/client.py tells users to run gaia daemon restart when it detects a host-API skew. That cannot fix the skew, and on the machine state that produces it the command does not exist.

The API version is a property of the installed GAIA core, not of the running process, so a restart relaunches the same core and it comes back advertising the same api_version. The user loops. Worse: the skew appears when the installed core is old, and old cores have no daemon subcommand at all.

Verified on the two cores on this machine:

$ ~/.gaia/venv/bin/gaia --version
0.17.1
$ ~/.gaia/venv/bin/gaia daemon restart
gaia: error: argument action: invalid choice: 'daemon' (choose from prompt, chat,
talk, summarize, ... mcp, cache, init, install, uninstall)

So the message hands a 0.17.1 user a command their core does not have, to fix a problem a restart could not have fixed anyway. The correct action is to align the core with the client — upgrade it.

Two call sites, both ending in the same instruction:

  • src/gaia/daemon/client.py:61-66 (_check_version) — "Restart it with gaia daemon restart, then retry."
  • src/gaia/daemon/client.py:163-173 (_check_agents_floor) — "Run gaia daemon restart, then retry."

The diagnostic half is already correct on the Python side: both messages name the version found and the version required, so a user can tell whether their core is too old or too new. Only the remedy is wrong.

Suggested wording

The Go client had the same defect and was fixed in #2700; matching it keeps the two sides consistent:

Upgrade the installed GAIA core so it matches this app: pip install --upgrade amd-gaia, or re-run the installer from https://amd-gaia.ai. The version comes from the installed core, so gaia daemon restart brings the same one back.

Naming the restart as a non-fix matters — without it, a user who has been trained by the old message will try it first and conclude GAIA is broken. pip install --upgrade amd-gaia is what the release notes and installer/scripts/install.sh:106 already use, and it is a single OS-neutral command.

Reproducing

Needs two GAIA cores on one machine, so it is not on the newcomer path — but it hits anyone whose versions drift:

  1. Install an older core (one advertising DAEMON_API_VERSION below 1.1) and start its daemon.
  2. Run a newer client against it.
  3. The skew message appears; following it loops.

~/.gaia/host/instance.json shows the running daemon's api_version; src/gaia/daemon/constants.py:23 declares what the client speaks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions