Skip to content

fix(cli): respect terminal.cwd in chat sessions#14136

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/terminal-cwd-chat-tool-14044
Closed

fix(cli): respect terminal.cwd in chat sessions#14136
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/terminal-cwd-chat-tool-14044

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Fixes #14044.

Summary

  • seed environment snapshots from the configured terminal cwd so chat sessions stop resetting to the launch directory
  • resolve relative CLI path completions from TERMINAL_CWD instead of the process cwd
  • add regressions covering both the local terminal session cwd and interactive path completion behavior

Testing

  • pytest -o addopts= tests/hermes_cli/test_path_completion.py
  • pytest -o addopts= tests/tools/test_local_shell_init.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard tool/terminal Terminal execution and process management labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #14079 (TUI gateway cwd bridging, closed), #10226, #9798, #7802 (all address terminal.cwd in different code paths). This PR targets the CLI chat session + base environment init path.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #14079, #10226, #9798, #7802.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution @LeonSGP43! Closing — the init_session cwd fix landed in #17205 (commit ac855bb) via @Tranquil-Flow's #14796, which uses the same approach (inject cd $cwd into the bootstrap before pwd -P). Both reports also overlap with the v0.11.0 fix 4c13628 (Popen cwd= argument). Issue #14044 is now resolved.

@teknium1 teknium1 closed this Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists tool/terminal Terminal execution and process management type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: terminal.cwd is not respected by terminal tool

3 participants