-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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.' | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
class AgentController: | ||
|
@@ -450,7 +451,7 @@ def _reset(self) -> None: | |
|
||
# make a new ErrorObservation with the tool call metadata | ||
if not found_observation: | ||
obs = ErrorObservation(content='The action has not been executed.') | ||
obs = ErrorObservation(content=ERROR_ACTION_NOT_EXECUTED) | ||
obs.tool_call_metadata = self._pending_action.tool_call_metadata | ||
obs._cause = self._pending_action.id # type: ignore[attr-defined] | ||
self.event_stream.add_event(obs, EventSource.AGENT) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reboot happens on crash, not on next action.
Keeping this reasonably short is probably a good idea too