Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed hanging bash commands from agent in os-task #163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rjmoss
Copy link

@rjmoss rjmoss commented Aug 11, 2024

If the agent puts out a command like
'while true; do ls /root; sleep 1; done'
it will loop while also putting out an output (meaning the socket doesn't timeout) so I've added a 30s cutoff. Without this it eventually fails but counts as an incomplete task rather than just a fail so it stops any of the overall stats working. With this fix the model will receive any output from the terminal up to this time cutoff.

There are other ways to address this problem (such as raising/catching an error instead of allowing the conversation to continue), please let me know if you think a different approach is better.

If the agent puts out a command like
    'while true; do ls /root; sleep 1; done'
it will loop while also putting out an output (meaning the socket
doesn't timeout) so I've added a 30s cutoff. Without this it eventually
fails but counts as an incomplete task rather than just a fail so it
stops any of the overall stats working.
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