Skip to content

fix(agent): let the agent's shell find python for stack commands - #235

Merged
arthware-dev merged 1 commit into
mainfrom
fix/agent-exec-path
Oct 16, 2026
Merged

arthware-dev merged 1 commit into
mainfrom
fix/agent-exec-path

Conversation

@arthware-dev

Copy link
Copy Markdown
Contributor

Summary

  • The agent's shell could not run any stack command: nanobot 0.3.5 starts commands without PATH, so the client's #!/usr/bin/env python3 did not find the image's Python and every call exited 127. Calls only worked when the model asked for a login shell.
  • The exec tool now passes PATH through. Found while validating PR feat(agent): let the admin allow stacklet commands for the agent #233 on the test rig; with it, the agent ran an allowed extension command from chat.

Every `stack ...` command the agent ran through its shell failed with
exit 127 (`/usr/bin/env: 'python3': No such file or directory`), unless
the model happened to ask for a login shell. nanobot 0.3.5 starts each
command with only HOME, LANG and TERM. The shell still finds `stack` on
its built-in search path, but the client's `#!/usr/bin/env python3` then
searches only /bin and /usr/bin, and the image keeps Python in
/usr/local/bin.

The exec tool now passes PATH through (`allowed_env_keys`).
@arthware-dev
arthware-dev merged commit 3730168 into main Oct 16, 2026
1 check passed
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