Skip to content

The agent that grows with you

fix: import hermes_bootstrap first in the compute-host and hermes-tools MCP entry modules

teknium1ae80cb726093
diff --git a/agent/transports/hermes_tools_mcp_server.py b/agent/transports/hermes_tools_mcp_server.py
index 2baacd9840c..64a6118957d 100644
--- a/agent/transports/hermes_tools_mcp_server.py
+++ b/agent/transports/hermes_tools_mcp_server.py
@@ -7,6 +7,12 @@ exposed over stdio MCP; codex registers it via ``~/.codex/config.toml
from __future__ import annotations
+# First, like every entry point: stdio, import-path and environ-lifetime fixes (hermes_bootstrap).
+try:
+ import hermes_bootstrap # noqa: F401
+except ModuleNotFoundError:
+ pass # a partial ``hermes update`` can leave the bootstrap unregistered
+
import inspect
import json
import logging
diff --git a/tui_gateway/compute_host.py b/tui_gateway/compute_host.py
index f68f7d2df0d..846b8f06f50 100644
--- a/tui_gateway/compute_host.py
+++ b/tui_gateway/compute_host.py
@@ -3,6 +3,9 @@
from __future__ import annotations
+# First, like every entry point: stdio, import-path and environ-lifetime fixes (hermes_bootstrap).
+import hermes_bootstrap # noqa: F401
+
import argparse
import concurrent.futures
import contextlib