Skip to content

feat: add shell tool and tests#39

Open
notowen333 wants to merge 2 commits intomainfrom
maintainer/notowen333-shell-tool
Open

feat: add shell tool and tests#39
notowen333 wants to merge 2 commits intomainfrom
maintainer/notowen333-shell-tool

Conversation

@notowen333
Copy link

@notowen333 notowen333 commented Mar 6, 2026

Issue #, if available:
https://github.com/strands-agents/private-sdk-python-staging/issues/340

Description of changes:

  • simple subprocess based shell avoiding full terminal emulation with pty

Distinct from TS:

  • persistent shell (i.e. cd and export will persist across tool calls)
  • binary encoded output is parsed
  • standard error and standard out write to the same pipe to avoid race conditions
  • clean garbage collection tied to agent lifecycle
  • uses default shell instead of specifying bash

First PR to add pytest tests to the python scripts section of the repo, so needed to add __init__ and requirements.txt

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@notowen333 notowen333 force-pushed the maintainer/notowen333-shell-tool branch from 98bd484 to db37c44 Compare March 9, 2026 15:36
zastrowm
zastrowm previously approved these changes Mar 10, 2026
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.

2 participants