fix(coding): teach agents terminal env state persists

Tell coding agents to activate shell setup once per session instead of re-sourcing it before every command, and pin the existing LocalEnvironment env-snapshot behavior with regression tests.
This commit is contained in:
Brooklyn Nicholson
2026-06-11 19:50:08 -05:00
parent afe53708ee
commit ab06ef8ed6
5 changed files with 63 additions and 1 deletions
+8
View File
@@ -22,6 +22,14 @@ def test_searching_for_sudo_does_not_trigger_rewrite(monkeypatch):
assert sudo_stdin is None
def test_terminal_schema_advertises_persistent_env_state():
description = terminal_tool.TERMINAL_TOOL_DESCRIPTION
assert "exported environment variables persist between calls" in description
assert "activate a virtualenv" in description
assert "do not re-source the same environment before every command" in description
def test_printf_literal_sudo_does_not_trigger_rewrite(monkeypatch):
monkeypatch.delenv("SUDO_PASSWORD", raising=False)
monkeypatch.delenv("HERMES_INTERACTIVE", raising=False)