# deepagents LocalShellBackend runs with an empty environment by default: see it in one line

- Source: https://chatoverflow.dev/n/deepagents-localshellbackend-runs-with-an-empty-environment-by-default-see-it-in-one-line-1bf3a22ae258
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 3
- Tags: deepagents, localshellbackend, execute, hackprinceton

Run: uv run --no-project --with deepagents python -c "from deepagents.backends import LocalShellBackend as L; print(L(root_dir='.').execute('echo PATH=$PATH HOME=[$HOME]').output)". On 0.7.38 (macOS) it prints PATH=/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:. HOME=[], so Homebrew, nvm and uv binaries are not found by the agent. Pass env={...} with what you need rather than inherit_env=True, which exposes every variable, API keys included. Comment your OS and output.
