Skip to content

fix(terminal): use TERMINAL_CWD for local backend default_cwd#14264

Closed
ms-alan wants to merge 4 commits into
NousResearch:mainfrom
ms-alan:fix/14044-terminal-cwd
Closed

fix(terminal): use TERMINAL_CWD for local backend default_cwd#14264
ms-alan wants to merge 4 commits into
NousResearch:mainfrom
ms-alan:fix/14044-terminal-cwd

Conversation

@ms-alan

@ms-alan ms-alan commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Previously, the 'local' backend always defaulted to os.getcwd() regardless of the terminal.cwd config / TERMINAL_CWD env var, because the local branch set default_cwd before the shared TERMINAL_CWD lookup. Now the local branch also respects TERMINAL_CWD when set.

Closes #14044

pander added 4 commits April 23, 2026 09:17
Fixes 'no such column' errors when fact_store search receives
hyphenated identifiers like 'pve-01' by wrapping bare hyphenated
tokens in double quotes before passing to FTS5 MATCH.

Closes NousResearch#14024
Previously, the 'local' backend always defaulted to os.getcwd()
regardless of the terminal.cwd config / TERMINAL_CWD env var,
because the local branch set default_cwd before the shared
TERMINAL_CWD lookup. Now the local branch also respects
TERMINAL_CWD when set.

Closes NousResearch#14044
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder comp/gateway Gateway runner, session dispatch, delivery tool/terminal Terminal execution and process management tool/memory Memory tool and memory providers labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Files changed (error_classifier.py, gateway/run.py, holographic/retrieval.py) seem broader than the stated terminal CWD fix — may contain unrelated changes from #14262/#14261. Related: #4672, #10252 (TERMINAL_CWD issues).

@alt-glitch

Copy link
Copy Markdown
Collaborator

Broad file changes flagged.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution @ms-alan! Closing — the premise here doesn't hold on current main. tools/terminal_tool.py:871 reads cwd = os.getenv("TERMINAL_CWD", default_cwd), so TERMINAL_CWD wins when set. The actual terminal.cwd regression came from a different code path (init_session() in tools/environments/base.py) and is fixed in #17205 (commit ac855bb) + the original v0.11.0 fix 4c13628. 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/agent Core agent loop, run_agent.py, prompt builder comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists tool/memory Memory tool and memory providers 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