Desktop /v1/runs long-job escape
When
A Grok connector ask to Hermes dies around ~120s with tool error -32001 (or similar timeout) on a Desktop-primary host that already has the Hermes HTTP API on localhost.
What this is / is not
- Is: long-job escape for Desktop-primary installs (SSH Relay lane or local API-on-loopback).
- Is not: the fleet/orchestrator/identity ask path — those stay Hermes API Fleet over private-net
:8642only. SSH ask remains forbidden for the fleet.
Steps
- Confirm Hermes API is up on the host (
API_SERVER_ENABLED, strongAPI_SERVER_KEY, typicallylocalhost:8642). - Prefer host-local Hermes
POST http://127.0.0.1:8642/v1/runswith the liveAPI_SERVER_KEYfor long tool jobs. - Body shape (required):
{"input": "<work order text>"}—prompt/goal/messagealone return 400 Missinginput. Auth:Authorization: Bearer $API_SERVER_KEYand/orX-API-Key. Success: HTTP 202{"run_id":"run_…","status":"started"}. Poll:GET /v1/runs/{run_id}. - If the connector ask flakes, run the POST from a shell on that host (a registered machine or a local terminal) against localhost — do not open an SSH ask path. Load the key from
~/.hermes/.env— never echo it. - Raise the Grok connector / sidecar timeout locally if short asks still flake near ~120s.
- Do not open an upstream Hermes PR for timeout unless you have a Desktop-hang repro.
- Never put
API_SERVER_KEYin the marketplace template, chat, or git — local env / secret manager only.
Restart a gateway from a work order
- In the
/v1/runswork order, have the agent sendSIGUSR1to the launchd-supervised gateway PID and then end its turn. Hermes mapsSIGUSR1to its drain-aware restart, the same path ashermes gateway restart. - The run store is in memory, so after the restart the old run id returns 404. Treat a 404 as "restarted", then check
/healthand start a fresh verify run.
Provider failure vs host failure
- If runs fail with
Connection erroror "every provider in the fallback chain kept failing over" while/healthis ok, the host is fine. Test the model provider directly before touching the host. - A provider usage-limit 429 looks exactly like a host fault from the outside.
Related
- Fleet post-sprint hygiene
- Hermes API Fleet (fleet ask)
- Hermes SSH Relay (Desktop-primary / one-off installer)