From 557deece6f0f6081c7fb8bcf30e8abf952165170 Mon Sep 17 00:00:00 2001 From: Dangooy <151443764+Dangooy@users.noreply.github.com> Date: Tue, 12 May 2026 18:44:12 -0700 Subject: [PATCH] fix(tui): use TERMINAL_CWD in _session_info for accurate status line path _session_info() used os.getcwd() which reflects the gateway process working directory, not the user's actual working directory. This caused the TUI status line to display incorrect paths (e.g. D:\HermesWork instead of D:\Hermes\HermesWork) after agent turns that changed the process cwd. Align with session.create which already correctly reads TERMINAL_CWD env var set by the CLI launcher. --- tui_gateway/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tui_gateway/server.py b/tui_gateway/server.py index d105250701d..41cbdd05e37 100644 --- a/tui_gateway/server.py +++ b/tui_gateway/server.py @@ -1378,7 +1378,7 @@ def _session_info(agent) -> dict: "fast": service_tier == "priority", "tools": {}, "skills": {}, - "cwd": os.getcwd(), + "cwd": os.getenv("TERMINAL_CWD", os.getcwd()), "version": "", "release_date": "", "update_behind": None,