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

Fix issue #5015: [Bug]: Headless mode awaits for requested user feedb… #5246

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

enyst
Copy link
Collaborator

@enyst enyst commented Nov 25, 2024

End-user friendly description of the problem this fixes or functionality that this introduces

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below
    Headless mode must not stop to ask the user for input.

Explain what this PR does

When the app is running in headless mode, it must not ask the user for input. This means two things:

  • if the agent is nevertheless waiting for input, send it automatically some message, apparently from a fake "user", to force it to continue instead of waiting.
  • do not raise.

Read the comments in the original issue: you will find an example of how headless mode is implemented silently in external scripts.

You have a unit test for headless mode set. Read it and fix it to conform to this behavior. Then add a test for headless mode not set.


Link of any specific issues this addresses
Fix #5015


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:200d70d-nikolaik   --name openhands-app-200d70d   docker.all-hands.dev/all-hands-ai/openhands:200d70d

…ack without showing any text for what that feedback should be
@enyst enyst marked this pull request as draft November 25, 2024 00:10
Copy link
Contributor

OpenHands started fixing the pr! You can monitor the progress here.

@enyst
Copy link
Collaborator Author

enyst commented Nov 25, 2024

The PR you are fixing is: #5246

Read all its contents before starting.

@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Nov 25, 2024
@enyst enyst added fix-me Attempt to fix this issue with OpenHands and removed fix-me-experimental labels Nov 25, 2024
@enyst
Copy link
Collaborator Author

enyst commented Nov 25, 2024

@openhands-agent End-user friendly description of the problem this fixes or functionality that this introduces:
Headless mode must not stop to ask the user for input.

Explain what this PR does

When the app is running in headless mode, it must not ask the user for input. This means two things:

  • if the agent is nevertheless waiting for input, send it automatically some message, apparently from a fake "user", to force it to continue instead of waiting.
  • do not raise.

Read the comments in the original issue: you will find an example of how headless mode is implemented silently in external scripts.

Copy link
Contributor

OpenHands started fixing the pr! You can monitor the progress here.

@All-Hands-AI All-Hands-AI deleted a comment from openhands-agent Nov 25, 2024
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Nov 25, 2024
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Nov 25, 2024
@enyst
Copy link
Collaborator Author

enyst commented Nov 25, 2024

openhands-agent, the previous comments were mostly solved. We have a few more things to do now:

  • review where the AgentController is initialized, and if headless mode is set, set a fake user response there
  • HOWEVER, do not overwrite a fake user response coming from a caller, if that is the case!
  • verify what fake user responses exist in the codebase. Hint: ./evaluation subfolders.
  • only if none is provided, and the mode is headless, have some default that is simple, and tells the agent something similar with the existing ones
  • unit tests: fix the test on this issue, and add a test for when the mode isn't headless.

@enyst enyst added fix-me Attempt to fix this issue with OpenHands and removed fix-me Attempt to fix this issue with OpenHands labels Nov 25, 2024
Copy link
Contributor

OpenHands started fixing the pr! You can monitor the progress here.

@All-Hands-AI All-Hands-AI deleted a comment from openhands-agent Nov 25, 2024
@enyst
Copy link
Collaborator Author

enyst commented Nov 25, 2024

@openhands-agent Python linting is failing on this PR in CI. You know how to run python linting in this project. Fix it and commit the fix.

Copy link
Contributor

The workflow to fix this issue encountered an error. Please check the workflow logs for more information.

@All-Hands-AI All-Hands-AI deleted a comment from openhands-agent Nov 25, 2024
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Nov 26, 2024
@enyst
Copy link
Collaborator Author

enyst commented Nov 26, 2024

@openhands-agent Look carefully at the diff of this PR. Undo the exact changes you made to traffic control. Only those, and commit; the rest is fine.

Copy link
Contributor

OpenHands started fixing the pr! You can monitor the progress here.

@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Nov 26, 2024
@All-Hands-AI All-Hands-AI deleted a comment from openhands-agent Nov 26, 2024
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Nov 26, 2024
@enyst enyst self-assigned this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix-me Attempt to fix this issue with OpenHands
Projects
None yet
2 participants