Skip to content

Getting OSError: Socket is closed when agent try to use code execution #411

Open
@aptdnfapt

Description

@aptdnfapt

os : ubuntu
docker version :Docker version 28.1.1, build 4eba377
image build :sha256:f1ce5b265fc3f196a5fd0a2477a7d88997b6d1ec1bf46c50cbe1964933472ca8
error :
Traceback (most recent call last):
Traceback (most recent call last):
File "/a0/agent.py", line 332, in monologue
tools_result = await self.process_tools(agent_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/a0/agent.py", line 683, in process_tools
response = await tool.execute(**tool_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/a0/python/tools/code_execution_tool.py", line 43, in execute
response = await self.execute_terminal_command(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/a0/python/tools/code_execution_tool.py", line 141, in execute_terminal_command
return await self.terminal_session(session, command, reset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/a0/python/tools/code_execution_tool.py", line 186, in terminal_session
raise e
File "/a0/python/tools/code_execution_tool.py", line 172, in terminal_session
self.state.shells[session].send_command(command)
File "/a0/python/helpers/shell_ssh.py", line 82, in send_command
self.shell.send(self.last_command)
File "/opt/venv/lib/python3.11/site-packages/paramiko/channel.py", line 799, in send
return self._send(s, m)
^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/paramiko/channel.py", line 1196, in _send
raise socket.error("Socket is closed")
OSError: Socket is closed

OSError: Socket is closed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions