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

Add separate timeout for commands without output #152

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

erkinalp
Copy link

This PR implements a separate timeout for commands that produce no output, allowing more granular control over command execution timeouts. This is particularly useful for detecting and handling hung commands that aren't producing any output.

Changes:

  • Add no_output_timeout field to BashAction for specifying a separate timeout
  • Implement two-phase timeout handling in _run_normal:
    1. First try with no_output_timeout
    2. If output is received, continue with remaining regular timeout
  • Improve error messages to distinguish between no-output and regular timeouts
  • Update documentation to reflect new timeout behavior

This improves command execution reliability by allowing early detection of hung commands while still giving time for slow but active commands to complete.

Link to Devin run: https://app.devin.ai/sessions/e14f693390ed47ba87d12698d5834d08

Fixes #9

devin-ai-integration bot and others added 2 commits December 20, 2024 08:22
When a command times out, the system now preserves and returns any output
that was collected before the timeout occurred. This improves the user
experience by not losing potentially valuable partial output.

Changes:
- Add partial_output to CommandTimeoutError
- Capture and return partial output in timeout scenarios
- Update documentation to reflect new behavior

Fixes SWE-agent#29

Co-Authored-By: Erkin Alp Güney <[email protected]>
When a command produces no output, it might be hanging or stuck. This
change adds a separate timeout specifically for this case, allowing
more granular control over command execution timeouts.

Changes:
- Add no_output_timeout field to BashAction
- Implement no-output timeout handling in _run_normal
- Update timeout logic to handle both timeouts
- Improve error messages for timeout scenarios

Fixes SWE-agent#9

Co-Authored-By: Erkin Alp Güney <[email protected]>
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.

Separate timeout for commands without output
1 participant