Skip to content

Conversation

amanjaiswal73892
Copy link
Collaborator

@amanjaiswal73892 amanjaiswal73892 commented Sep 5, 2025

This pull request removes the timeout for waiting on user responses in both the generic_human_guided_agent.py and hitl_agent.py agents. Now, the system will wait indefinitely for user input instead of timing out after 600 seconds.

User input handling:

  • Changed the wait_for_response method in both generic_human_guided_agent.py and hitl_agent.py to wait indefinitely for user responses by setting timeout=None instead of a 600-second timeout. [1] [2]

Description by Korbit AI

What change is being made?

Set the timeout parameter to None for the wait_for_response function in the generic_human_guided_agent.py and hitl_agent.py modules.

Why are these changes being made?

This change allows the human-in-the-loop (HITL) agents to wait indefinitely for user responses, ensuring that the system does not prematurely time out after 600 seconds if the response takes longer. This is important for scenarios where human inputs have unpredictable delays, thus providing more flexibility and preventing potential interruption in user interactions.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Security Infinite Wait Vulnerability ▹ view
Files scanned
File Path Reviewed
src/agentlab/agents/hitl_agent/hitl_agent.py
src/agentlab/agents/hitl_agent/generic_human_guided_agent.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@@ -75,7 +75,7 @@ def get_action(self, obs):
)

self.ui.update_context(hint_labeling_inputs)
response = self.ui.wait_for_response(timeout=600)
response = self.ui.wait_for_response(timeout=None)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Infinite Wait Vulnerability category Security

Tell me more
What is the issue?

The timeout for the UI response wait has been changed from 600 seconds to None, effectively removing the timeout limit.

Why this matters

Without a timeout limit, the application becomes vulnerable to potential Denial of Service (DoS) attacks where a malicious user could intentionally hang the system indefinitely by never providing a response.

Suggested change ∙ Feature Preview
response = self.ui.wait_for_response(timeout=600)  # Or another reasonable timeout value
Provide feedback to improve future suggestions

Nice Catch Incorrect Not in Scope Not in coding standard Other

💬 Looking for more details? Reply to this comment to chat with Korbit.

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