From 63d045b51af985f9a0d6840b02917128b5869d33 Mon Sep 17 00:00:00 2001 From: shin4 <42616633+shin4@users.noreply.github.com> Date: Thu, 16 Apr 2026 08:13:11 +0800 Subject: [PATCH] fix: pass HERMES_HOME to execute_code subprocess (#6644) Add "HERMES_" to _SAFE_ENV_PREFIXES in code_execution_tool.py so HERMES_HOME and other Hermes env vars pass through to execute_code subprocesses. Fixes vision_analyze and other tools that rely on get_hermes_home() failing in Docker environments with non-default HERMES_HOME. Authored by @shin4. --- tools/code_execution_tool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/code_execution_tool.py b/tools/code_execution_tool.py index bed4f2091..723bc400d 100644 --- a/tools/code_execution_tool.py +++ b/tools/code_execution_tool.py @@ -988,7 +988,8 @@ def execute_code( # (terminal.env_passthrough) are passed through. _SAFE_ENV_PREFIXES = ("PATH", "HOME", "USER", "LANG", "LC_", "TERM", "TMPDIR", "TMP", "TEMP", "SHELL", "LOGNAME", - "XDG_", "PYTHONPATH", "VIRTUAL_ENV", "CONDA") + "XDG_", "PYTHONPATH", "VIRTUAL_ENV", "CONDA", + "HERMES_") _SECRET_SUBSTRINGS = ("KEY", "TOKEN", "SECRET", "PASSWORD", "CREDENTIAL", "PASSWD", "AUTH") try: