Bug: TUI sessions don't record cwd — Desktop groups them under default workspace
_launch_cwd_for_session() in run_agent.py only records cwd when source == "cli". TUI sessions (source == "tui") get cwd = NULL, so the Desktop GUI cannot group them by workspace — they all land in the default/"No workspace" group.
Steps to reproduce
cd ~/Documents/pa && hermes --tui
- Start a new session
- Open Desktop GUI — the session appears under the default workspace, not under a "pa" workspace
Root cause
run_agent.py:80:
def _launch_cwd_for_session(source: str) -> Optional[str]:
if source != "cli": # <-- TUI excluded
return None
All TUI sessions in state.db show cwd = /Users/lestroy (home) or NULL, regardless of the actual launch directory.
Suggested fix
if source not in ("cli", "tui"):
return None
Related issues
Bug: TUI sessions don't record cwd — Desktop groups them under default workspace
_launch_cwd_for_session()inrun_agent.pyonly records cwd whensource == "cli". TUI sessions (source == "tui") getcwd = NULL, so the Desktop GUI cannot group them by workspace — they all land in the default/"No workspace" group.Steps to reproduce
cd ~/Documents/pa && hermes --tuiRoot cause
run_agent.py:80:All TUI sessions in
state.dbshowcwd = /Users/lestroy(home) or NULL, regardless of the actual launch directory.Suggested fix
Related issues