mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
fix(cli): local backend CLI always uses launch directory, stops .env sync of TERMINAL_CWD (#19334)
The old CWD heuristic was fooled by: 1. TERMINAL_CWD persisted to .env by `hermes config set terminal.cwd` 2. Inherited TERMINAL_CWD from parent hermes processes 3. Only resolved when config had a placeholder value (not explicit paths) Fix: - load_cli_config() unconditionally uses os.getcwd() for local backend - TERMINAL_CWD always force-exported in CLI mode (overrides stale values) - Gateway sets _HERMES_GATEWAY=1 marker so lazy cli.py imports don't clobber - Remove terminal.cwd from config-set .env sync map (prevents re-poisoning) - Clarify setup wizard label as 'Gateway working directory' Closes #19214
This commit is contained in:
parent
434d70d8bc
commit
a11aed1acc
7 changed files with 116 additions and 126 deletions
|
|
@ -316,6 +316,10 @@ def _restart_notification_pending() -> bool:
|
|||
return (_hermes_home / ".restart_notify.json").exists()
|
||||
|
||||
|
||||
# Mark this process as a gateway so cli.py's module-level load_cli_config()
|
||||
# knows not to clobber TERMINAL_CWD if lazily imported.
|
||||
os.environ["_HERMES_GATEWAY"] = "1"
|
||||
|
||||
_ensure_ssl_certs()
|
||||
|
||||
# Add parent directory to path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue