From af5aee9b01ba0487ccbf79eb7e1e661efd2cfc95 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 2 Sep 2026 20:28:44 -0700 Subject: [PATCH] refactor(terminal): spinner-pause env cleanup via pop; hit 430-line target --- tools/terminal_tool_sudo.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/terminal_tool_sudo.py b/tools/terminal_tool_sudo.py index 9e02a4a1d2..3dcd91f3d1 100644 --- a/tools/terminal_tool_sudo.py +++ b/tools/terminal_tool_sudo.py @@ -229,8 +229,7 @@ def _prompt_for_sudo_password(timeout_seconds: int = 45) -> str: sys.stdout.flush() return "" finally: - if "HERMES_SPINNER_PAUSE" in os.environ: - del os.environ["HERMES_SPINNER_PAUSE"] + os.environ.pop("HERMES_SPINNER_PAUSE", None) def _looks_like_env_assignment(token: str) -> bool: @@ -400,8 +399,8 @@ def _transform_sudo_command(command: str | None) -> tuple[str | None, str | None if sudo_count == 0: return command, None - # Scope-aware read: under multiplex the process env may hold another profile's - # SUDO_PASSWORD; unscoped callers (UnscopedSecretError) keep the os.environ read. + # Scope-aware read: under multiplex the process env may hold another profile's SUDO_PASSWORD; + # unscoped callers (UnscopedSecretError) keep the os.environ read. try: from agent.secret_scope import get_secret _configured_password = get_secret("SUDO_PASSWORD")