Skip to content

The agent that grows with you

test(terminal): the local default reaches the environment too; config comment matches the docs

Teknium745380d4959e
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.py
index 40ff809da2c..7ba5f64a0eb 100644
--- a/hermes_cli/config_defaults.py
+++ b/hermes_cli/config_defaults.py
@@ -386,8 +386,8 @@ DEFAULT_CONFIG = {
"docker_snap_compat": False,
# Trusted profiles sharing one Docker container identity; empty = per-profile boundary.
"docker_shared_container_key": "",
- # SSH: carry exported env vars between commands (cwd always carries; plain vars/functions
- # never do). false = each command starts from the login env. Local: TERMINAL_LOCAL_PERSISTENT.
+ # SSH: carry exported env vars between commands (cwd always carries). false = every command
+ # starts from the login env, profile functions included. Local: TERMINAL_LOCAL_PERSISTENT.
"persistent_shell": True,
},
diff --git a/tests/tools/test_local_persistent_shell.py b/tests/tools/test_local_persistent_shell.py
index 838fb1794fa..067f2ff9c63 100644
--- a/tests/tools/test_local_persistent_shell.py
+++ b/tests/tools/test_local_persistent_shell.py
@@ -39,12 +39,13 @@ def test_local_persistent_defaults_on_and_reaches_the_environment(monkeypatch, t
monkeypatch.delenv("TERMINAL_LOCAL_PERSISTENT", raising=False)
config = _get_env_config()
assert config["local_persistent"] is True
- env = _create_configured_env({**config, "local_persistent": False}, "local", image="", cwd=str(tmp_path),
- timeout=30, task_id="local-persist-config", host_cwd=None)
- try:
- assert env._persist_env is False
- finally:
- env.cleanup()
+ for value, task in ((config["local_persistent"], "default"), (False, "off")):
+ env = _create_configured_env({**config, "local_persistent": value}, "local", image="", cwd=str(tmp_path),
+ timeout=30, task_id=f"local-persist-config-{task}", host_cwd=None)
+ try:
+ assert env._persist_env is value
+ finally:
+ env.cleanup()
@pytest.mark.platforms("linux", "macos")