Files
hermes-agent/tools
Teknium 89963452ee fix(terminal): make persistent_shell / TERMINAL_*_PERSISTENT actually work
Since the spawn-per-call rewrite (d684d7ee7e) the persistence knobs were read
into config but never reached the environment: SSHEnvironment took no such
param and _create_environment dropped local_config. Every local and SSH
session carried cwd + exported env across commands regardless of the setting.

BaseEnvironment gains persist_env (default True). When False the per-command
wrapper still sources the login-time snapshot and still emits the cwd marker,
but skips the post-command export re-dump, so exports from one command do not
reach the next. SSHEnvironment/LocalEnvironment accept persistent=...;
_build_ssh_env forwards ssh_config['persistent'] and every local construction
path (terminal, file tools, execute_code, ensure_task_env) now forwards
TERMINAL_LOCAL_PERSISTENT via _local_config_from_config.

Defaults equal today's real behaviour: TERMINAL_LOCAL_PERSISTENT now defaults
to true (it was documented false but ignored), SSH keeps following
terminal.persistent_shell (true). Only users who explicitly set the knob to
false see a change: they get the isolation they asked for.

Docs: the Persistent Shell section claimed plain shell vars persist and that
local was non-persistent; rewritten to state exactly what carries over.
2026-10-11 16:53:57 -07:00
..
2026-10-09 17:34:38 +02:00
2026-10-08 19:54:07 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 19:54:07 +02:00
2026-10-08 21:29:48 +02:00
2026-10-08 21:35:58 +02:00
2026-10-09 17:34:36 +02:00
2026-10-08 21:38:05 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:36 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:36 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 19:42:29 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:36 +02:00