Skip to content

Conversation

@guanh01
Copy link

@guanh01 guanh01 commented Jan 16, 2026

Description

Fixed a resource leak in the shell tool by properly closing PTY file descriptors in the CommandExecutor class. The change adds a try-catch block in the finally clause to ensure the PTY file descriptor is closed when the process completes, preventing potential resource exhaustion.

Related Issues

#368

Documentation PR

None

Type of Change

Bug fix

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

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

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