mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
When using Modal, Docker, SSH, or Singularity as the terminal backend from the CLI, the agent resolved cwd: "." to the host machine's local path (e.g. /Users/rewbs/code/hermes-agent) and passed it to the remote sandbox, where it doesn't exist. All commands failed with "No such file or directory". Root cause: cli.py unconditionally resolved "." to os.getcwd() and wrote it to TERMINAL_CWD regardless of backend type. Every tool then used that host-local path as the working directory inside the remote environment. Fixes: - cli.py: only resolve "." to os.getcwd() for the local backend. For all remote backends (ssh, docker, modal, singularity), leave TERMINAL_CWD unset so the tool layer uses per-backend defaults (/root, /, ~, etc.) - terminal_tool.py: added sanity check -- if TERMINAL_CWD contains a host-local prefix (/Users/, /home/, C:\) for a non-local backend, log a warning and fall back to the backend's default - terminal_tool.py: SSH default CWD is now ~ instead of os.getcwd() - file_operations.py: last-resort CWD fallback changed from os.getcwd() to "/" so host paths never leak into remote file operations |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| browser_tool.py | ||
| cronjob_tools.py | ||
| file_operations.py | ||
| file_tools.py | ||
| fuzzy_match.py | ||
| image_generation_tool.py | ||
| mixture_of_agents_tool.py | ||
| patch_parser.py | ||
| rl_training_tool.py | ||
| skills_tool.py | ||
| terminal_hecate.py | ||
| terminal_tool.py | ||
| transcription_tools.py | ||
| tts_tool.py | ||
| vision_tools.py | ||
| web_tools.py | ||