Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/environments/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def _build_provider_env_blocklist() -> frozenset:
# to a different Python version overwrites it and breaks the gateway). The
# Hermes venv stays reachable via PATH (its bin dir is first), so stripping
# these markers is safe and only prevents the cross-project clobber (#23473).
_ACTIVE_VENV_MARKER_VARS = ("VIRTUAL_ENV", "CONDA_PREFIX")
_ACTIVE_VENV_MARKER_VARS = ("VIRTUAL_ENV", "CONDA_PREFIX", "PYTHONPATH")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes all PYTHONPATH entries, including user/package-manager paths. execute_code intentionally allows PYTHONPATH (tools/code_execution_tool.py:148-150), and the Nix wrapper appends it for extraPythonPackages plugin discovery (nix/hermes-agent.nix:116-121, 206-208). Please filter only Hermes-injected incompatible site-packages entries and cover the separate execute_code path.



def _is_hermes_internal_secret(key: str) -> bool:
Expand Down
Loading