{"record":{"id":"7b3aa33350f0ee3f","repo":"NousResearch/hermes-agent","slug":"iron-proxy-is-not-running-nothing-to-reload-ru","errorCode":null,"errorMessage":"iron-proxy is not running — nothing to reload.  Run `hermes egress start`.","messagePattern":"iron-proxy is not running — nothing to reload\\.  Run `hermes egress start`\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"warning","filePath":"agent/proxy_sources/iron_proxy.py","lineNumber":930,"sourceCode":"    return (host or \"127.0.0.1\", port)\n\n\ndef reload_proxy() -> bool:\n    \"\"\"Hot-reload the running daemon's ruleset via the management API.\n\n    POSTs to ``/v1/reload`` on the loopback management listener; the daemon\n    re-reads proxy.yaml and atomically swaps the transform pipeline —\n    validation failures leave the running config untouched (HTTP 422).\n\n    Returns True on a successful reload.  Raises ``RuntimeError`` with an\n    actionable message when the daemon isn't running, the config predates\n    management-API support (no ``management`` block → restart required),\n    or the reload is rejected.\n    \"\"\"\n\n    pid = _read_pid()\n    if not pid or not _pid_alive(pid):\n        raise RuntimeError(\n            \"iron-proxy is not running — nothing to reload.  \"\n            \"Run `hermes egress start`.\"\n        )\n    mgmt = _read_management_listen_from_config()\n    if mgmt is None:\n        raise RuntimeError(\n            \"The generated proxy.yaml has no management listener (written \"\n            \"before reload support).  Re-run `hermes egress setup` and use \"\n            \"`hermes egress restart` this one time.\"\n        )\n    token = _read_management_token()\n    if not token:\n        raise RuntimeError(\n            \"management.token is missing — re-run `hermes egress setup`, \"\n            \"then `hermes egress restart`.\"\n        )\n\n    import urllib.error","sourceCodeStart":912,"sourceCodeEnd":948,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/proxy_sources/iron_proxy.py#L912-L948","documentation":"reload_proxy() POSTs to /v1/reload on the daemon's loopback management listener to hot-swap the config without dropping the proxy. It first reads the pidfile and checks liveness; if there is no pid or the pid is dead, there is nothing to reload and it raises with the command to bring the daemon up. This is a state precondition error, not a failure of the reload itself.","triggerScenarios":"Calling reload_proxy() / `hermes egress reload` when the daemon was never started, was stopped (`hermes egress stop`), or crashed — _read_pid() returns None or _pid_alive(pid) is False.","commonSituations":"Editing proxy rules and running reload after a reboot (the daemon isn't auto-started); the daemon crashed earlier and nobody noticed; running reload on a fresh machine where setup ran but start never did.","solutions":["Start the daemon with `hermes egress start`, then re-run `hermes egress reload`.","If you expected it to be running, inspect the daemon log (iron-proxy.log in the proxy state dir) for the earlier crash and fix that first.","In automation, gate reload on get_status() showing a running daemon instead of assuming."],"exampleFix":"// before\nreload_proxy()  # RuntimeError: nothing to reload\n\n// after\nfrom agent.proxy_sources.iron_proxy import get_status, start_proxy, reload_proxy\nif not get_status().running:\n    start_proxy()\nreload_proxy()","handlingStrategy":"validation","validationCode":"from agent.proxy_sources.iron_proxy import get_status\n\ndef proxy_is_running() -> bool:\n    try:\n        return get_status().running\n    except Exception:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    reload_proxy()\nexcept RuntimeError as e:\n    if \"nothing to reload\" in str(e):\n        start_proxy()\n        reload_proxy()\n    else:\n        raise","preventionTips":["In automation, always gate reload on a running-daemon check (pid/get_status) instead of assuming.","After host reboots, start the daemon before any reload-driven config rollout."],"tags":["lifecycle","daemon","iron-proxy"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}