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.
This commit is contained in:
Dangooy 2026-05-12 18:44:12 -07:00 committed by Teknium
parent 081f9368bc
commit 557deece6f

View file

@ -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,