hermes - 💡(How to fix) Fix [Bug] LM Studio headless mode: model not auto-loaded after upgrade (Windows unlogged boot)

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

  1. Configure LM Studio to start at Windows boot (background service/task, no GUI login required)
  2. Configure Hermes Agent with custom provider pointing to LM Studio local server
  3. Reboot Windows and do not log in (stay on lock screen)
  4. Observe: LM Studio HTTP server starts, but the model is never loaded into memory
  5. Hermes Agent fails to connect/respond because no active model exists

Fix Action

Workaround

Manually log into Windows and open LM Studio GUI to trigger model loading before Hermes Agent can function. This defeats the purpose of headless automation.

RAW_BUFFERClick to expand / collapse

Problem Summary

After upgrading Hermes Agent, the agent can no longer automatically trigger LM Studio to load its model when Windows boots in headless/unlogged state. Before the upgrade, this workflow worked seamlessly.

Environment

  • OS: Windows 11 (headless / unlogged upon boot)
  • Backend LLM Server: LM Studio (local server, starts automatically at boot as background service/task)
  • Hermes Agent: Latest version (post-upgrade)
  • Connection: Custom provider via config.yamlproviders.custom.base_url: http://<IP>:1234

Reproduction Steps

  1. Configure LM Studio to start at Windows boot (background service/task, no GUI login required)
  2. Configure Hermes Agent with custom provider pointing to LM Studio local server
  3. Reboot Windows and do not log in (stay on lock screen)
  4. Observe: LM Studio HTTP server starts, but the model is never loaded into memory
  5. Hermes Agent fails to connect/respond because no active model exists

Expected Behavior (Pre-Upgrade)

Hermes Agent would send its first API request with the model field in the payload, which triggered LM Studio's on-demand auto-loading mechanism. The model would load dynamically and the agent would function normally.

Actual Behavior (Post-Upgrade)

The model remains unloaded. Hermes Agent either:

  • Fails during health check before sending any inference request
  • Sends a malformed/missing model parameter that LM Studio cannot use to trigger loading
  • Gives up after initial connection failure without retrying

Suspected Root Causes

1. Strict Health Check Blocking Auto-Trigger

The upgraded Hermes Agent may execute a strict health check on /v1/models immediately upon startup. If the active model list returns empty [] (because LM Studio hasn't received a session-based GUI trigger), the new code may abort or mark the backend as dead, instead of proceeding to send an inference request that would trigger dynamic loading.

2. Missing model Parameter in Initial Payload

LM Studio relies on the model field in /v1/chat/completions requests to trigger its on-demand auto-loading feature. If the upgraded Agent omitted this field during initialization, or changed how it's passed in the configuration, LM Studio remains idle.

3. Race Condition / Insufficient Retry Backoff

At system boot (before user login), Windows background services start asynchronously. If Hermes Agent initializes faster than LM Studio's backend HTTP server, insufficient retry-and-backoff logic causes permanent failure on the first connection attempt.

Proposed Fixes

  1. Lazy Loading Support: Don't hard-fail if /v1/models returns empty during health check. Allow the agent to enter a "ready-to-connect" state and pass the model identifier in the first inference payload to trigger LM Studio's dynamic loading.
  2. Explicit Preload Request: After confirming HTTP server is 200 OK, send a proactive request to load the configured model before accepting tasks.
  3. Robust Retry with Exponential Backoff: Add configurable retry logic (e.g., 5 attempts, 10s/20s/40s intervals) for initial connection during boot scenarios.

Workaround

Manually log into Windows and open LM Studio GUI to trigger model loading before Hermes Agent can function. This defeats the purpose of headless automation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Bug] LM Studio headless mode: model not auto-loaded after upgrade (Windows unlogged boot)