Skip to content

fix(mcp): tell the agent where run_command runs - #91

Merged
vishr merged 2 commits into
mainfrom
fix/run-command-environment
Oct 31, 2026
Merged

vishr merged 2 commits into
mainfrom
fix/run-command-environment

Conversation

@vishr

@vishr vishr commented Oct 31, 2026

Copy link
Copy Markdown
Member

Commands run with HOME and TMPDIR in Chat's private scratch directory and a
PATH of system directories only, but the tool description said neither. The
agent read the results as if they came from the user's shell: go clean
-modcache reported success after clearing an empty cache in scratch, and npm
failed with exit code 127 without the agent knowing why.

The description now states HOME, TMPDIR and PATH, asks for full paths to
other programs, and says writes outside the project and scratch are refused.

vishr added 2 commits October 31, 2026 08:32
Commands run with HOME and TMPDIR in Chat's private scratch directory and a
PATH of system directories only, but the tool description said neither. The
agent read the results as if they came from the user's shell: go clean
-modcache reported success after clearing an empty cache in scratch, and npm
failed with exit code 127 without the agent knowing why.

The description now states HOME, TMPDIR and PATH, asks for full paths to
other programs, and says writes outside the project and scratch are refused.
Address review: the scratch home starts empty, and Homebrew programs such
as npm start node through /usr/bin/env, so a full path alone fails; set
PATH in a script instead.
@vishr
vishr merged commit 940d8a4 into main Oct 31, 2026
11 of 12 checks passed
@vishr
vishr deleted the fix/run-command-environment branch October 31, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant