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

nit: improve error message when action is not executed #7029

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

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Feb 28, 2025

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

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


Give a summary of what the PR does, explaining any non-trivial design decisions.

Improve error message (for both human and agent) when action is not executed


Link of any specific issues this addresses.


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:e2350d1-nikolaik   --name openhands-app-e2350d1   docker.all-hands.dev/all-hands-ai/openhands:e2350d1

@xingyaoww xingyaoww marked this pull request as ready for review February 28, 2025 21:09
@xingyaoww xingyaoww requested a review from enyst February 28, 2025 21:09
@@ -58,6 +58,7 @@
TRAFFIC_CONTROL_REMINDER = (
"Please click on resume button if you'd like to continue, or start a new task."
)
ERROR_ACTION_NOT_EXECUTED = 'The action has not been executed. This likely occurred because the runtime system crashed due to resource limitations. Note that the OpenHands agent has limited resources available for running commands. The agent can retry this action - the runtime system can be rebooted when retrying. However, be aware that any dependencies, environment variables, or other system state previously set up by the agent might be lost after the reboot process.'

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this happens also when the user pressed STOP button. I'm checking now if I'm not hallucinating 😅

I'm thinking also... this is a bit interesting message because it feels made for remote, but I don't know how suitable it is for local use. 🤔

If running literally on local runtime, probably not quite right?

Copy link
Collaborator

@enyst enyst Feb 28, 2025

Choose a reason for hiding this comment

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

I can confirm it happens also when the user presses the 'Stop' button 🤔 which makes sense, that action will never complete (or so we assume or hope!), so we give the agent LLM something with tool_id.

@@ -58,6 +58,7 @@
TRAFFIC_CONTROL_REMINDER = (
"Please click on resume button if you'd like to continue, or start a new task."
)
ERROR_ACTION_NOT_EXECUTED = 'The action has not been executed. This likely occurred because the runtime system crashed due to resource limitations. Note that the OpenHands agent has limited resources available for running commands. The agent can retry this action - the runtime system can be rebooted when retrying. However, be aware that any dependencies, environment variables, or other system state previously set up by the agent might be lost after the reboot process.'
Copy link
Collaborator

@rbren rbren Feb 28, 2025

Choose a reason for hiding this comment

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

Suggested change
ERROR_ACTION_NOT_EXECUTED = 'The action has not been executed. This likely occurred because the runtime system crashed due to resource limitations. Note that the OpenHands agent has limited resources available for running commands. The agent can retry this action - the runtime system can be rebooted when retrying. However, be aware that any dependencies, environment variables, or other system state previously set up by the agent might be lost after the reboot process.'
ERROR_ACTION_NOT_EXECUTED = 'The action has not been executed. This likely occurred because the runtime system crashed and was rebooted due to resource limitations. Be aware that any dependencies, environment variables, or other system state previously set up by the agent may have been lost after the reboot process.'

Reboot happens on crash, not on next action.

Keeping this reasonably short is probably a good idea too

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.

3 participants