Repository navigation
Commit 6a499df
fix(tui): make the launch cwd win over an inherited HERMES_CWD
`_launch_tui` builds the child env from `os.environ.copy()` (via
`build_subprocess_env`) and only repaired HERMES_CWD when it was missing or no
longer a directory (`hermes_cli/main_tui_launch.py:684-686`). A HERMES_CWD
exported by an outer `hermes --tui` — or by the user's own shell — names a real
directory, so it survived into the Node TUI, and
`ui-tui/src/gatewayClient.ts:478` starts the gateway process in whatever it
names: the session read files and completions from last session's project.
Assign HERMES_CWD from the live launch cwd right after the env is built, ahead
of the `--worktree` block so an explicit worktree still wins.
`_apply_tui_python_env` is deliberately untouched — it is shared with the
dashboard PTY launch at `hermes_cli/web_server_chat.py:344`, which has no
launch cwd of its own.
Fixes #49637
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent 23d9fd4 commit 6a499df
2 files changed
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
365 | 370 | | |
366 | 371 | | |
367 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
0 commit comments