Is there a reson i cant't send "read" action from ...
# questions
b
Is there a reson i cant't send "read" action from websocket from user? seems like it would be a simple way to load more context insetad of asking teh agent to read a file? there is an assert that currently prevents it from being processed properly
Copy code
18:00:08 - openhands:ERROR: agent_controller.py:306 - [Agent Controller 901a38633d1448bf9470eca364248466] Error while running the agent (session ID: 901a38633d1448bf9470eca364248466): Tool call metadata should NOT be None when function calling is enabled. Action: FileReadAction(path='.openhands/project.md', start=0, end=-1, thought='', action=<ActionType.READ: 'read'>, security_risk=None, impl_source=<FileReadSource.DEFAULT: 'default'>, view_range=None). Traceback: Traceback (most recent call last):
  File "/app/openhands/controller/agent_controller.py", line 304, in _step_with_exception_handling
    await self._step()
  File "/app/openhands/controller/agent_controller.py", line 813, in _step
    action = self.agent.step(self.state)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openhands/agenthub/codeact_agent/codeact_agent.py", line 191, in step
    messages = self._get_messages(condensed_history, initial_user_message)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openhands/agenthub/codeact_agent/codeact_agent.py", line 262, in _get_messages
    messages = self.conversation_memory.process_events(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openhands/memory/conversation_memory.py", line 110, in process_events
    messages_to_add = self._process_action(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/app/openhands/memory/conversation_memory.py", line 235, in _process_action
    assert tool_metadata is not None, (
           ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tool call metadata should NOT be None when function calling is enabled. Action: FileReadAction(path='.openhands/project.md', start=0, end=-1, thought='', action=<ActionType.READ: 'read'>, security_risk=None, impl_source=<FileReadSource.DEFAULT: 'default'>, view_range=None)
is it possible to fix this?
image.png
g
@limited-student-10747 is sending "read" messages from user supposed to be supported? seems like an easy fix to make it work.
c
totally nod. I think we should be able to support this
Created an issue to track 🙂 https://github.com/All-Hands-AI/OpenHands/issues/10304 feel free to submit PR if you have already implemented this!
PR to fix it 🙏 @gorgeous-horse-69467 can you check if it fixes your problem? https://github.com/All-Hands-AI/OpenHands/pull/10416
b
@calm-artist-7206 i created PR for this - i think it fixes tool metadata verification that the other does not https://github.com/All-Hands-AI/OpenHands/pull/10420
thanks on a stick 1
c
🙌 approved