Skip to content

fix(local): normalize invalid cwd to home#13165

Closed
tangyuanjc wants to merge 1 commit into
NousResearch:mainfrom
tangyuanjc:fix/local-cwd-normalization
Closed

fix(local): normalize invalid cwd to home#13165
tangyuanjc wants to merge 1 commit into
NousResearch:mainfrom
tangyuanjc:fix/local-cwd-normalization

Conversation

@tangyuanjc

Copy link
Copy Markdown

Summary

  • normalize local execution cwd values so ~ expands correctly
  • fall back to the user home directory when a requested local cwd does not exist
  • cover both foreground LocalEnvironment and background ProcessRegistry execution

Testing

  • pytest -o addopts='' tests/tools/test_local_env_blocklist.py tests/tools/test_process_registry.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists backend/local Local shell execution comp/tools Tool registry, model_tools, toolsets tool/terminal Terminal execution and process management labels Apr 22, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution @tangyuanjc! Closing — silently falling back to $HOME when the configured cwd doesn't exist is exactly the symptom users have been reporting (terminal commands running in $HOME instead of the project dir). The right behavior is to surface the bad config, not to mask it. The actual cwd regression is fixed in #17205 (commit ac855bb) + the v0.11.0 fix 4c13628.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend/local Local shell execution comp/tools Tool registry, model_tools, toolsets 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.

3 participants