Skip to content

Silent infinite loop on fresh install — missing lastConnectionID in preferences.json #51

Description

@Iamevanjordan

What I was doing

I finally got to the point of dispatching my first Hermes swarm(the latest update 0.15.1) to finish out some Temporal workflows and ended up on hermes-desktop (the native macOS app) after the web UI wasn't cutting it for my setup/workflow. After a fresh install I tried opening it up to connect to my VPS but every time I put in my credentials, then saved it to connect the app to my host, nothing appeared. No error, no spinner, no timeout message. Just sitting back at the main screen.

What I found out that happened

The app silently enters an infinite loop on launch when preferences.json is missing the lastConnectionID field. There's no UI feedback at all — no error, no loading state, no indication anything is wrong. It just loops forever and you have no idea. This happens on a fresh install because preferences.json is created without lastConnectionID by default.

Steps to reproduce

  1. Fresh install of hermes-desktop on macOS
  2. Open the app — it creates preferences.json if it doesn't exist
  3. Add a connection via the UI (it gets saved to connections.json)
  4. Attempt to connect to your host
  5. App loops silently, no feedback, no timeout

Expected behavior

Either auto-select the first/only connection, surface an error, or prompt the user to pick a connection. Anything but a silent loop.

Actual behavior

Silent infinite loop. Zero UI feedback.

Root cause

preferences.json is missing the lastConnectionID key on a fresh install. The app appears to loop waiting for it without ever telling you that's the problem. preferences.json (broken state): json{"theme": "dark"} connections.json has your connection entry with an id field — but preferences.json has no lastConnectionID pointing to it, so the app never knows which connection to use.

Fix that worked

Manually inject lastConnectionID into preferences.json, matching the id of the entry in connections.json:json {"theme": "dark", "lastConnectionID": "your-connection-id-here"} Relaunch. App auto-connects immediately. Every subsequent launch works fine after that — the field gets maintained once it's seeded.

Why this matters

I'm not sure if I'm the first but new users on a fresh install may hit this wall every time. There's no error message, no log output visible in the UI, and no mention of this in the README. I spent longer than I'd like to admit ruling out VPS config, firewall rules, and SSH issues before tracing it to a missing JSON key lol.

Happy to help test a fix or take a crack at a PR if you can point me at the right place in the codebase. From what I've used it for so far I have been enjoying the overall app experience though!

Activity

  1. dodo-reach commented on Jun 4, 2026

    @dodo-reach
    Owner

    Thanks for the detailed report. This describes the host-selection bug fixed in Hermes Desktop v1.0.1, but the version mentioned in the issue (0.15.1) appears to be the Hermes Agent version rather than the Hermes Desktop version.

    Could you confirm the Hermes Desktop version you are actually running?

    You can check it from Hermes Desktop > About Hermes Desktop, or run:

    /usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" \
      /Applications/HermesDesktop.app/Contents/Info.plist

    The fixed release should report 1.0.1:
    https://github.com/dodo-reach/hermes-desktop/releases/tag/v1.0.1

    In v1.0.1, saving the first host immediately sets lastConnectionID, and launch also repairs an existing connections.json when lastConnectionID is missing or stale. There is no loop waiting for that field; a missing field is a normal representation of a nil optional before the first host exists.

    One other detail: the example preferences.json containing only {"theme":"dark"} does not match Hermes Desktop’s current preferences schema, which uses keys such as appAppearance, terminalTheme, and lastConnectionID. Please confirm the exact path of the file you inspected was:

    ~/Library/Application Support/HermesDesktop/preferences.json
    

    If you are definitely running Desktop v1.0.1 and can still reproduce this, please share:

    • the Desktop version shown in About
    • whether multiple HermesDesktop.app copies exist on the Mac
    • redacted connections.json and preferences.json
    • the exact screen shown after pressing Save

    Please do not include SSH credentials or private host details. I will leave this issue open while we confirm whether this is an older v1.0.0 installation or a separate v1.0.1 case.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions