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

[QUESTION]: How to resume a saved session? #144

Closed
kevin-support-bot bot opened this issue Dec 21, 2024 · 68 comments
Closed

[QUESTION]: How to resume a saved session? #144

kevin-support-bot bot opened this issue Dec 21, 2024 · 68 comments

Comments

@kevin-support-bot
Copy link

All-Hands-AI#5726 Issue


@kripper It will be resumed automatically.

@kripper
Copy link

kripper commented Dec 21, 2024

I mean, how to resume any of the saved sessions, not just the last one.

@SmartManoj
Copy link
Owner

Could you apply commit 1d4f692 and check using the conversation ID like http://localhost:3000/conversations/ae299e4431a54b52b82a45602ec81a13?

@kripper
Copy link

kripper commented Dec 22, 2024

Is it possible to keep the sandboxes created and resume them when the session is resumed?

@SmartManoj
Copy link
Owner

Yes, 2200b21

@kripper
Copy link

kripper commented Dec 23, 2024

@SmartManoj

I'm testing the latest version of your repo, and I'm unable to reconnect to a previous conversation.
I noticed that OH is always working on the same sandbox. I was expecting it to use different containers for each session.

The VS Code web endpoint also is not working.

@kripper
Copy link

kripper commented Dec 23, 2024

Solved.
I had to set explicitly persist_sandbox = false because it was true by default.
Now it's using 1 container per session as expected.

@kripper
Copy link

kripper commented Dec 23, 2024

Remaining issues: VS Code web is not working (in all sessions):
Error switching to VS Code: VS Code is not available

@kripper
Copy link

kripper commented Dec 24, 2024

It's unstable.
Somtimes OH looses connection with the sandbox.

To reproduce:

  1. Start a new conversation
  2. Stop the sandbox with docker stop <container>
  3. Reopen the conversation

Result: The sandbox container is started, but OH cannot connect to it.

This are the processes running inside the sandbox:

$ docker exec -it 07cf1925f789 bash
root@b747bf5b64f4:/openhands/code# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1 103476 12052 ?        Ssl  00:36   0:00 /openhands/micromamba/bin/micromamba r
root         8  1.4  3.3 596408 270692 ?       Sl   00:36   0:03 /openhands/poetry/openhands-ai-5O4_aCH
root        29  0.0  0.0   4544  2780 pts/0    Ss   00:36   0:00 /usr/bin/su openhands
openhan+    30  0.0  0.0   4608  3728 pts/0    S+   00:36   0:00 bash
root        33  0.0  0.1  16052 13072 ?        S    00:36   0:00 /openhands/poetry/openhands-ai-5O4_aCH
root        34  2.0  3.4 459628 280456 ?       Sl   00:36   0:05 /openhands/poetry/openhands-ai-5O4_aCH
root        38  0.0  0.0   2576   884 ?        S    00:36   0:00 /bin/sh /openhands/poetry/openhands-ai
root        42  0.4  0.8 791112 68908 ?        Sl   00:36   0:01 /openhands/poetry/openhands-ai-5O4_aCH
root       114  0.0  1.2 34012328 103828 ?     Ssl  00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       116  0.0  0.7 33864384 58700 ?      S    00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       117  0.0  0.7 33864388 58388 ?      S    00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       132  0.0  0.7 33943672 58684 ?      Sl   00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       133  0.0  0.9 33914056 73572 ?      Sl   00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       212  0.0  1.2 34041080 101844 ?     Ssl  00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       214  0.0  0.7 33864388 57728 ?      S    00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       215  0.0  0.7 33864384 57200 ?      S    00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       230  0.0  0.7 33946748 61272 ?      Sl   00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       237  0.0  0.8 33914056 72600 ?      Sl   00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       252  0.0  1.2 1186847864 98880 ?    Sl   00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       260  0.0  1.1 1186848768 95416 ?    Sl   00:36   0:00 /root/.cache/ms-playwright/chromium-10
root       269  0.0  0.0   2576   896 ?        S    00:36   0:00 /bin/sh -c su - openhands -s /bin/bash
root       270  0.0  0.0   4564  2832 ?        S    00:36   0:00 su - openhands -s /bin/bash
root       271  0.0  0.0   2576   920 ?        S    00:36   0:00 /bin/sh -c su - openhands -s /bin/bash
openhan+   272  0.0  0.0   3924  2912 ?        S    00:36   0:00 -bash
root       274  0.0  0.0   4564  2756 ?        S    00:36   0:00 su - openhands -s /bin/bash
openhan+   276  0.0  0.0   2576   892 ?        S    00:36   0:00 sh /openhands/.openvscode-server/bin/o
openhan+   277  0.0  0.1 103376 12156 ?        Sl   00:36   0:00 /openhands/micromamba/bin/micromamba r
openhan+   284  0.5  0.9 231876 73924 ?        Sl   00:36   0:01 /openhands/poetry/openhands-ai-5O4_aCH
openhan+   288  0.1  0.7 11714416 61464 ?      Sl   00:36   0:00 /openhands/.openvscode-server/node /op
openhan+   306  1.3  3.2 919948 266648 ?       Ssl  00:36   0:03 /openhands/poetry/openhands-ai-5O4_aCH
root       330  0.2  0.0   4608  3748 pts/1    Ss   00:40   0:00 bash
root       336  0.0  0.0   8536  4220 pts/1    R+   00:40   0:00 ps aux

@kripper
Copy link

kripper commented Dec 24, 2024

I confirmed that each container uses a different HTTP for the "PID 8" (/openhands/poetry/openhands-ai-5O4_aCHf-py3.12/bin/python -u -m openhands.runtime.action_execution_server 32472 --working-dir /workspace --plugins agent_skills jupyter vscode --username openhands --user-id 1000), and that the HTTP ports are reachable from the OH container.

But the front-end says: Agent has stopped or Agent is initialized, waiting for task... and the web terminal doesn't work.

@kripper
Copy link

kripper commented Dec 24, 2024

After stopping the sandbox (to reproduce the bug), sometimes the sandbox it is autorestarted and generates this logs:

$ docker logs e443d483e0f8 -f
Web UI available at http://localhost:33579?tkn=52528347-3167-4c96-8fd3-ad876d3a1564
[01:18:34] Extension host agent started.
[I 2024-12-24 01:18:35.488 KernelGatewayApp] Jupyter Kernel Gateway 3.0.1 is available at http://0.0.0.0:41689
[I 2024-12-24 01:18:36.144 KernelGatewayApp] Kernel started: 21575200-1c36-4c74-b8d8-c4acc5f4ef9a
[I 241224 01:18:36 web:2348] 201 POST /api/kernels (127.0.0.1) 304.63ms
[W 2024-12-24 01:18:36.149 KernelGatewayApp] No session ID specified <---- is this ok?
[I 241224 01:18:36 web:2348] 101 GET /api/kernels/21575200-1c36-4c74-b8d8-c4acc5f4ef9a/channels (127.0.0.1) 610.51ms
[I 2024-12-24 01:18:36.759 KernelGatewayApp] Connecting to kernel 21575200-1c36-4c74-b8d8-c4acc5f4ef9a.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:33578 (Press CTRL+C to quit)

BTW, even when OH lost connection to the sandbox (web terminal doesn't work), the Web UI (VS Code) endpoint works fine:
http://localhost:33579

Thus, the problem is only the "Open in VS Code" button in the frontend.

@SmartManoj
Copy link
Owner

Added persist sandbox for each conversation.

@kripper
Copy link

kripper commented Jan 6, 2025

[EDIT] Nevermind. I rebuilt everything and it seems to work now.

I also added this to .devcontainer/on_create.sh:

sudo add-apt-repository -y ppa:deadsnakes/ppa \
    && apt-get update \
    && apt-get install -y python3.12 python3.12-venv python3.12-dev python3-pip \
    && ln -s /usr/bin/python3.12 /usr/bin/python

# See: /~https://github.com/SmartManoj/Kevin/issues/122#issuecomment-2540482254
git config --global --add safe.directory /workspaces/OpenHands

@kripper
Copy link

kripper commented Jan 7, 2025

@SmartManoj

I'm still unable to run your last repo version.
It's trying to connect to port 37055 but fails.
When I check, I see the port is listening.
Maybe it fails before the port is listened?

BTW, why are the LLM UI settings lost after restarting the OH Container?

This is my config:

[core]
workspace_base = "./workspace"
debug = 1

[sandbox]
#use_host_network = 0
persist_sandbox = 1
persist_sandbox_for_each_conversation = 1
fast_boot = 0

Logs:

00:55:44 - openhands:INFO: runtime_build.py:182 - Building image: ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_wmj0kcvi9xqhnmo2
00:55:44 - openhands:INFO: docker_runtime.py:159 - Starting runtime with image: ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_wmj0kcvi9xqhnmo2
00:55:44 - openhands:WARNING: docker_runtime.py:243 - Using host network mode. If you are using MacOS, please make sure you have the latest version of Docker Desktop and enabled host network feature: https://docs.docker.com/network/drivers/host/#docker-desktop
00:55:46 - openhands:INFO: docker_runtime.py:163 - Container started: kevin-runtime-persisted-oh-_workspaces_OpenHands_workspace_c1a6630dbecd4c2987551d8351aaa027. VSCode URL: None
00:55:46 - openhands:INFO: docker_runtime.py:182 - Waiting for client to become ready at http://localhost:37055...
00:55:46 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive
00:55:46 - openhands:ERROR: docker_runtime.py:393 - Error checking if alive: HTTPConnectionPool(host='localhost', port=37055): Max retries exceeded with url: /alive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8f6d8fb590>: Failed to establish a new connection: [Errno 111] Connection refused'))
00:55:46 - openhands:ERROR: session.py:128 - Error creating controller: Unable to connect to the runtime docker container. Please check if the container is running and there is no error in the container logs. Make sure you have enabled host networking in the docker desktop settings. Steps: https://docs.docker.com/network/drivers/host/#docker-desktop
Traceback (most recent call last):
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 199, in _new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

@SmartManoj
Copy link
Owner

SmartManoj commented Jan 7, 2025

Could you revert this commit and check?

Maybe it fails before the port is listened?

If so, Timeout error will occur.

Is curl http://localhost:37055/alive working in WSL?

@SmartManoj
Copy link
Owner

&& apt-get install -y python3.12 python3.12-venv python3.12-dev python3-pip \

In Github Codespaces, does mcr.microsoft.com/devcontainers/universal now have Python 3.12?

@SmartManoj
Copy link
Owner

BTW, why are the LLM UI settings lost after restarting the OH Container?

#180 (comment)

@kripper
Copy link

kripper commented Jan 7, 2025

In Github Codespaces, does mcr.microsoft.com/devcontainers/universal now have Python 3.12?

Yes, It's based on Ubuntu 20.04.6

@SmartManoj
Copy link
Owner

sudo add-apt-repository -y ppa:deadsnakes/ppa
&& apt-get update
&& apt-get install -y python3.12 python3-pip

So, this is not needed. right?

@kripper
Copy link

kripper commented Jan 7, 2025

Is curl http://localhost:37055/alive working in WSL?

{"status":"ok"} everywhere (host and OH container).
Maybe OH is checking and failing before the port is available?

@SmartManoj
Copy link
Owner

before the port is available?

How long does it take? Could you increase the timeout?

or could you remove this 7ee6e4a

@kripper
Copy link

kripper commented Jan 7, 2025

sudo add-apt-repository -y ppa:deadsnakes/ppa
&& apt-get update
&& apt-get install -y python3.12 python3-pip

So, this is not needed. right?

I added the repo (based on the dev Dockerfile), because python3.12-dev was missing.
I guess it's better to update them all together.

Anyway, I believe the devcontainer.json should have:

"build": {
	"dockerfile": "../containers/dev/Dockerfile"
}

But the problem is that VS Code Docker extension seems not to support the HEREDOC tags used in the dev Dockerfile.

Remember I'm not using Codespaces, but trying to use DevContainer as a dev environment on Windows.
The official instructions (using dev.sh to build the dev container) require a WSL Container.
But what's the point in building the dev container nested inside another WSL container?

On the other hand, trying to build the dev contianer on windows (using the composer file) also fails.
Should I port the dev.sh to Windows?

How did you build your dev container on Windows?

@SmartManoj
Copy link
Owner

How did you build your dev container on Windows?

I didn't build it yet.

@SmartManoj
Copy link
Owner

But the problem is that VS Code Docker extension seems not to support the HEREDOC tags used in the dev Dockerfile.

Does it happen due to the line endings? moby/buildkit#3511

@kripper
Copy link

kripper commented Jan 7, 2025

How long does it take? Could you increase the timeout?

It's not time timeout:

INFO:     ('127.0.0.1', 54278) - "WebSocket /socket.io/?latest_event_id=-1&conversation_id=4c1e5938374b4a7eb333cf12f8bbc7be&EIO=4&transport=websocket" [accepted]
INFO:     connection open
04:36:57 - openhands:INFO: listen_socket.py:26 - sio:connect: HbaL767QEJ5ai2uMAAAB
INFO:     connection closed
04:36:57 - openhands:INFO: docker_runtime.py:143 - Creating new Docker container
04:36:58 - openhands:INFO: runtime_build.py:182 - Building image: ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_dbemgdwy94pw05c2
================ DOCKER BUILD STARTED ================
#8 [4/5] COPY ./code/openhands /openhands/code/openhands
#8 DONE 1.7s
#9 [5/5] RUN chmod a+rwx /openhands/code/openhands/__init__.py
#9 DONE 0.8s
#10 exporting to image
#10 exporting layers
#10 exporting layers 0.4s done
#10 writing image sha256:3ae4472b7c11642bb0e14fa380e84aaf3a5bf81b86b545629f36ac8
#10 naming to ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_dbemgdw
#10 DONE 0.6s
04:37:04 - openhands:INFO: docker.py:145 - Image [ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_dbemgdwy94pw05c2] build finished.
04:37:04 - openhands:INFO: docker.py:166 - Image ghcr.io/all-hands-ai/runtime with tags [oh_v0.18.0a0_cc4crp5cjo320znm_dbemgdwy94pw05c2] built successfully
04:37:04 - openhands:INFO: docker_runtime.py:159 - Starting runtime with image: ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_dbemgdwy94pw05c2
04:37:04 - openhands:WARNING: docker_runtime.py:243 - Using host network mode. If you are using MacOS, please make sure you have the latest version of Docker Desktop and enabled host network feature: https://docs.docker.com/network/drivers/host/#docker-desktop
04:37:05 - openhands:INFO: docker_runtime.py:163 - Container started: kevin-runtime-persisted-oh-_workspaces_OpenHands_workspace_4c1e5938374b4a7eb333cf12f8bbc7be. VSCode URL: None
04:37:05 - openhands:INFO: docker_runtime.py:182 - Waiting for client to become ready at http://localhost:31668...
04:37:05 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:37:05 - openhands:ERROR: docker_runtime.py:393 - Error checking if alive: HTTPConnectionPool(host='localhost', port=31668): Max retries exceeded with url: /alive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f51cbcfe540>: Failed to establish a new connection: [Errno 111] Connection refused'))
04:37:05 - openhands:ERROR: session.py:128 - Error creating controller: Unable to connect to the runtime docker container. Please check if the container is running and there is no error in the container logs. Make sure you have enabled host networking in the docker desktop settings. Steps: https://docs.docker.com/network/drivers/host/#docker-desktop
Traceback (most recent call last):
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 199, in _new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connectionpool.py", line 495, in _make_request
    conn.request(
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 441, in request
    self.endheaders()
  File "/usr/local/python/3.12.1/lib/python3.12/http/client.py", line 1322, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/python/3.12.1/lib/python3.12/http/client.py", line 1081, in _send_output
    self.send(msg)
  File "/usr/local/python/3.12.1/lib/python3.12/http/client.py", line 1025, in send
    self.connect()
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 279, in connect
    self.sock = self._new_conn()
                ^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 214, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f51cbcfe540>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connectionpool.py", line 843, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=31668): Max retries exceeded with url: /alive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f51cbcfe540>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspaces/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 391, in _wait_until_alive
    self.check_if_alive()
  File "/workspaces/OpenHands/openhands/runtime/impl/action_execution/action_execution_client.py", line 100, in check_if_alive
    with self._send_action_server_request(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/runtime/impl/action_execution/action_execution_client.py", line 96, in _send_action_server_request
    return send_request(self.session, method, url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
    return copy(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
    result = action(retry_state)
             ^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 398, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/runtime/utils/request.py", line 43, in send_request
    response = session.request(method, url, timeout=timeout, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=31668): Max retries exceeded with url: /alive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f51cbcfe540>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspaces/OpenHands/openhands/server/session/session.py", line 116, in initialize_agent
    await self.agent_session.start(
  File "/workspaces/OpenHands/openhands/server/session/agent_session.py", line 94, in start
    await self._create_runtime(
  File "/workspaces/OpenHands/openhands/server/session/agent_session.py", line 202, in _create_runtime
    await self.runtime.connect()
  File "/workspaces/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 185, in connect
    await call_sync_from_async(self._wait_until_alive)
  File "/workspaces/OpenHands/openhands/utils/async_utils.py", line 18, in call_sync_from_async
    result = await coro
             ^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/utils/async_utils.py", line 17, in <lambda>
    coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
                                              ^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
    return copy(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
    result = action(retry_state)
             ^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 398, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 397, in _wait_until_alive
    raise Exception(f'Unable to connect to the runtime docker container. Please check if the container is running and there is no error in the container logs. {extra_msg}')
Exception: Unable to connect to the runtime docker container. Please check if the container is running and there is no error in the container logs. Make sure you have enabled host networking in the docker desktop settings. Steps: https://docs.docker.com/network/drivers/host/#docker-desktop
--- Logging error ---
Traceback (most recent call last):
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 199, in _new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connectionpool.py", line 495, in _make_request
    conn.request(
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 441, in request
    self.endheaders()
  File "/usr/local/python/3.12.1/lib/python3.12/http/client.py", line 1322, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/python/3.12.1/lib/python3.12/http/client.py", line 1081, in _send_output
    self.send(msg)
  File "/usr/local/python/3.12.1/lib/python3.12/http/client.py", line 1025, in send
    self.connect()
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 279, in connect
    self.sock = self._new_conn()
                ^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 214, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f51cbcfe540>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/connectionpool.py", line 843, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=31668): Max retries exceeded with url: /alive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f51cbcfe540>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspaces/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 391, in _wait_until_alive
    self.check_if_alive()
  File "/workspaces/OpenHands/openhands/runtime/impl/action_execution/action_execution_client.py", line 100, in check_if_alive
    with self._send_action_server_request(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/runtime/impl/action_execution/action_execution_client.py", line 96, in _send_action_server_request
    return send_request(self.session, method, url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
    return copy(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
    result = action(retry_state)
             ^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 398, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/runtime/utils/request.py", line 43, in send_request
    response = session.request(method, url, timeout=timeout, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=31668): Max retries exceeded with url: /alive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f51cbcfe540>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspaces/OpenHands/openhands/server/session/session.py", line 116, in initialize_agent
    await self.agent_session.start(
  File "/workspaces/OpenHands/openhands/server/session/agent_session.py", line 94, in start
    await self._create_runtime(
  File "/workspaces/OpenHands/openhands/server/session/agent_session.py", line 202, in _create_runtime
    await self.runtime.connect()
  File "/workspaces/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 185, in connect
    await call_sync_from_async(self._wait_until_alive)
  File "/workspaces/OpenHands/openhands/utils/async_utils.py", line 18, in call_sync_from_async
    result = await coro
             ^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/utils/async_utils.py", line 17, in <lambda>
    coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
                                              ^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
    return copy(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
    result = action(retry_state)
             ^^^^^^^^^^^^^^^^^^^
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 398, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 397, in _wait_until_alive
    raise Exception(f'Unable to connect to the runtime docker container. Please check if the container is running and there is no error in the container logs. {extra_msg}')
Exception: Unable to connect to the runtime docker container. Please check if the container is running and there is no error in the container logs. Make sure you have enabled host networking in the docker desktop settings. Steps: https://docs.docker.com/network/drivers/host/#docker-desktop

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/python/3.12.1/lib/python3.12/logging/__init__.py", line 1160, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/logging/__init__.py", line 999, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/workspaces/OpenHands/openhands/core/logger.py", line 57, in format
    new_record: logging.LogRecord = copy.deepcopy(record)
                                    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/copy.py", line 162, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/copy.py", line 259, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/copy.py", line 136, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/copy.py", line 221, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/copy.py", line 136, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/copy.py", line 201, in _deepcopy_tuple
    y = [deepcopy(a, memo) for a in x]
         ^^^^^^^^^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/copy.py", line 151, in deepcopy
    rv = reductor(4)
         ^^^^^^^^^^^
TypeError: cannot pickle 'traceback' object
Call stack:
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/bin/uvicorn", line 8, in <module>
    sys.exit(main())
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/uvicorn/main.py", line 412, in main
    run(
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/uvicorn/main.py", line 579, in run
    server.run()
  File "/home/codespace/.cache/pypoetry/virtualenvs/openhands-ai-QLt0qIPP-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 66, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/local/python/3.12.1/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
  File "/usr/local/python/3.12.1/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/usr/local/python/3.12.1/lib/python3.12/asyncio/base_events.py", line 671, in run_until_complete
    self.run_forever()
  File "/usr/local/python/3.12.1/lib/python3.12/asyncio/base_events.py", line 638, in run_forever
    self._run_once()
  File "/usr/local/python/3.12.1/lib/python3.12/asyncio/base_events.py", line 1971, in _run_once
    handle._run()
  File "/usr/local/python/3.12.1/lib/python3.12/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "/workspaces/OpenHands/openhands/server/session/session.py", line 128, in initialize_agent
    logger.exception(f'Error creating controller: {e}')
Message: 'Error creating controller: Unable to connect to the runtime docker container. Please check if the container is running and there is no error in the container logs. Make sure you have enabled host networking in the docker desktop settings. Steps: https://docs.docker.com/network/drivers/host/#docker-desktop'
Arguments: ()
04:37:11 - openhands:INFO: manager.py:439 - _cleanup_session:4c1e5938374b4a7eb333cf12f8bbc7be
04:37:11 - openhands:INFO: manager.py:463 - _close_session:4c1e5938374b4a7eb333cf12f8bbc7be
04:37:11 - openhands:INFO: manager.py:471 - removing connections: []
04:37:11 - openhands:INFO: manager.py:480 - closing_session:4c1e5938374b4a7eb333cf12f8bbc7be

@kripper
Copy link

kripper commented Jan 7, 2025

or could you remove this 7ee6e4a

That helps:

INFO:     ('127.0.0.1', 50698) - "WebSocket /socket.io/?latest_event_id=-1&conversation_id=8250e994e59f4f93b6d15fe9ea848258&EIO=4&transport=websocket" [accepted]
INFO:     connection open
04:51:24 - openhands:INFO: listen_socket.py:26 - sio:connect: MPQa1L2GpBSpUF-VAAAB
INFO:     connection closed
04:51:24 - openhands:INFO: docker_runtime.py:143 - Creating new Docker container
04:51:24 - openhands:INFO: runtime_build.py:182 - Building image: ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9
================ DOCKER BUILD STARTED ================
#7 CACHED
#8 [4/5] COPY ./code/openhands /openhands/code/openhands
#8 DONE 0.1s
#9 [5/5] RUN chmod a+rwx /openhands/code/openhands/__init__.py
#9 DONE 0.2s
#10 exporting to image
#10 exporting layers 0.1s done
#10 writing image sha256:8da5faef555f1771ce8df2aa9ff92e311b5877bde2380c382add3e7
#10 naming to ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_fetw52w
#10 DONE 0.1s
04:51:26 - openhands:INFO: docker.py:145 - Image [ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9] build finished.
04:51:26 - openhands:INFO: docker.py:166 - Image ghcr.io/all-hands-ai/runtime with tags [oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9] built successfully
04:51:26 - openhands:INFO: docker_runtime.py:159 - Starting runtime with image: ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9
04:51:26 - openhands:WARNING: docker_runtime.py:243 - Using host network mode. If you are using MacOS, please make sure you have the latest version of Docker Desktop and enabled host network feature: https://docs.docker.com/network/drivers/host/#docker-desktop
04:51:27 - openhands:INFO: docker_runtime.py:163 - Container started: kevin-runtime-persisted-oh-_workspaces_OpenHands_workspace_8250e994e59f4f93b6d15fe9ea848258. VSCode URL: None
04:51:27 - openhands:INFO: docker_runtime.py:182 - Waiting for client to become ready at http://localhost:36899...
04:51:27 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:29 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:31 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:33 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:35 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:37 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:38 - openhands:INFO: manager.py:439 - _cleanup_session:8250e994e59f4f93b6d15fe9ea848258
04:51:38 - openhands:INFO: manager.py:463 - _close_session:8250e994e59f4f93b6d15fe9ea848258
04:51:38 - openhands:INFO: manager.py:471 - removing connections: []
04:51:38 - openhands:INFO: manager.py:480 - closing_session:8250e994e59f4f93b6d15fe9ea848258
04:51:39 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:41 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:43 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:45 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
INFO:     127.0.0.1:50680 - "GET /api/options/config HTTP/1.1" 200 OK
INFO:     127.0.0.1:50688 - "GET /api/settings HTTP/1.1" 404 Not Found
04:51:47 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:49 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:51 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:53 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:55 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:57 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:59 - openhands:INFO: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
04:51:59 - openhands:INFO: docker_runtime.py:188 - Runtime is ready.
04:51:59 - openhands:INFO: docker_runtime.py:206 - Copied selenium files to runtime
04:51:59 - openhands:INFO: base.py:258 - Found 0 local microagents.
04:51:59 - openhands:INFO: agent_controller.py:423 - Setting agent(CodeActAgent) state from AgentState.LOADING to AgentState.INIT
04:51:59 - openhands:INFO: agent_controller.py:332
OBSERVATION
AgentStateChangedObservation(content='', agent_state=<AgentState.INIT: 'init'>, observation='agent_state_changed')
INFO:     127.0.0.1:50682 - "GET /api/options/config HTTP/1.1" 200 OK
INFO:     127.0.0.1:50666 - "GET /api/settings HTTP/1.1" 404 Not Found
04:52:03 - openhands:INFO: agent_controller.py:423 - Setting agent(CodeActAgent) state from AgentState.INIT to AgentState.STOPPED
04:52:03 - openhands:INFO: agent_controller.py:332
OBSERVATION
AgentStateChangedObservation(content='', agent_state=<AgentState.STOPPED: 'stopped'>, observation='agent_state_changed')
04:52:03 - openhands:INFO: manager.py:490 - closed_session:8250e994e59f4f93b6d15fe9ea848258
INFO:     127.0.0.1:51500 - "GET /api/options/config HTTP/1.1" 200 OK
INFO:     127.0.0.1:51516 - "GET /api/settings HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:51524 - "GET /api/options/config HTTP/1.1" 200 OK
INFO:     127.0.0.1:51524 - "GET /api/settings HTTP/1.1" 404 Not Found

Now I have to find out why the endpoint answers with a {"detail":"Not Found"}

@SmartManoj
Copy link
Owner

Now I have to find out why the endpoint answers with a {"detail":"Not Found"}

Did you curl without /alive?

@kripper
Copy link

kripper commented Jan 7, 2025

Did you curl without /alive?

[EDIT] Yes.

I thought I got out of storage space on my laptop, because it was working earlier.
The sandboxes docker volume got huge and the physical space is not being released after deleting the content. I will fix this and try again.

@SmartManoj
Copy link
Owner

How much storage space?

4th option may help. But it will take some time. What do you think about Podman?
image

@kripper
Copy link

kripper commented Jan 7, 2025

/alive is ok.
I believe the problem is that OH is closing_session before the sandbox is ready:

�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:45 - Initializing new conversation
�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:48 - Loading settings
�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:51 - Settings loaded
�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:60 - Loading conversation store
�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:62 - Conversation store loaded
�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:68 - New conversation ID: 7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:77 - Saving metadata for conversation 7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:86 - Starting agent loop for conversation 7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:20:59 - openhands:INFO�[0m: manager.py:346 - maybe_start_agent_loop:7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:20:59 - openhands:INFO�[0m: manager.py:349 - start_agent_loop:7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:20:59 - openhands:INFO�[0m: manager.py:364 - _get_event_stream:7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:20:59 - openhands:INFO�[0m: manager.py:367 - found_local_agent_loop:7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:20:59 - openhands:INFO�[0m: manage_conversations.py:100 - Finished initializing conversation 7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:20:59 - openhands:INFO�[0m: llm.py:149 - self.config.model='gemini-2.0-flash-exp'
�[92m13:20:59 - openhands:INFO�[0m: llm.py:150 - self.config.max_input_tokens=4096
�[92m13:20:59 - openhands:INFO�[0m: llm.py:151 - self.config.max_output_tokens=8192
�[92m13:20:59 - openhands:INFO�[0m: codeact_agent.py:101 - Function calling not enabled for model gemini-2.0-flash-exp. Mocking function calling via prompting.
�[92m13:20:59 - openhands:INFO�[0m: llm.py:149 - self.config.model='gemini-2.0-flash-exp'
�[92m13:20:59 - openhands:INFO�[0m: llm.py:150 - self.config.max_input_tokens=4096
�[92m13:20:59 - openhands:INFO�[0m: llm.py:151 - self.config.max_output_tokens=8192
INFO:     127.0.0.1:51312 - "POST /api/conversations HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/route-CqoTYncD.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/route-f-NArwO0.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/route-BiqwXxeu.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/toast-B4_7JCPC.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/highlight-C6cjnpsf.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/action-type-Bp4gHXNe.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/index-CSx93YDY.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/index-BdvMfM4Y.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51318 - "GET /assets/terminal-CFbL2ovg.css HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/terminal-CxKr-7SL.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /api/options/config HTTP/1.1" 200 OK
INFO:     127.0.0.1:51318 - "GET /api/settings HTTP/1.1" 404 Not Found
INFO:     ('127.0.0.1', 51368) - "WebSocket /socket.io/?latest_event_id=-1&conversation_id=7e7a73cd6482478c8f4d5b741bd67e55&EIO=4&transport=websocket" [accepted]
INFO:     connection open
�[92m13:21:00 - openhands:INFO�[0m: listen_socket.py:26 - sio:connect: trttgU-pq8rWiPR_AAAB
INFO:     connection closed
�[92m13:21:00 - openhands:INFO�[0m: docker_runtime.py:143 - Creating new Docker container
�[92m13:21:01 - openhands:INFO�[0m: runtime_build.py:182 - Building image: ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9
�[92m13:25:45 - openhands:INFO�[0m: docker.py:145 - Image [ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9] build finished.
�[92m13:25:45 - openhands:INFO�[0m: docker.py:150 - Re-tagged image [ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9] with more generic tag [oh_v0.18.0a0_cc4crp5cjo320znm]
�[92m13:25:45 - openhands:INFO�[0m: docker.py:166 - Image ghcr.io/all-hands-ai/runtime with tags [oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9, oh_v0.18.0a0_cc4crp5cjo320znm] built successfully
�[92m13:25:45 - openhands:INFO�[0m: docker_runtime.py:159 - Starting runtime with image: ghcr.io/all-hands-ai/runtime:oh_v0.18.0a0_cc4crp5cjo320znm_fetw52wd5fip4sd9
�[92m13:25:45 - openhands:WARNING�[0m: docker_runtime.py:243 - Using host network mode. If you are using MacOS, please make sure you have the latest version of Docker Desktop and enabled host network feature: https://docs.docker.com/network/drivers/host/#docker-desktop
�[92m13:25:45 - openhands:INFO�[0m: manager.py:439 - _cleanup_session:7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:25:45 - openhands:INFO�[0m: manager.py:463 - _close_session:7e7a73cd6482478c8f4d5b741bd67e55
�[92m13:25:45 - openhands:INFO�[0m: manager.py:471 - removing connections: []
�[92m13:25:45 - openhands:INFO�[0m: manager.py:480 - closing_session:7e7a73cd6482478c8f4d5b741bd67e55
================ DOCKER BUILD STARTED ================
INFO:     127.0.0.1:51318 - "GET /api/options/config HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /api/settings HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:50232 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:50232 - "GET /assets/manifest-49c113c6.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/entry.client-F-0-wrUR.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/chunk-K6AXKMTT-KyAxkPYk.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/root-CLIJktlG.css HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/use-config-pZSEVLEj.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/react-redux-DbTEHRXA.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/module-DPMLSMqE.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/settings-up-to-date-context-DRHatnlz.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/open-hands-DfdZCH51.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/store-CDGJCbF2.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/infiniteQueryBehavior-vOc9alKw.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/index-CNgE5Yq9.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/preload-helper-D7HrI6pR.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/auth-context-DinNgien.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/i18nInstance-CnyO1Rew.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/settings-BirfeU04.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/initial-query-slice-Bw05O1aL.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/browser-slice-BhzmBQwF.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/with-props-gi9rW2-k.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/agent-state-u5yf9HVO.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/root-B7Dwe8Cj.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /locales/en/translation.json HTTP/1.1" 200 OK
INFO:     127.0.0.1:50232 - "GET /api/options/config HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /assets/route-CMCWe-cw.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/route-ZaJRKpiy.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/github-logo-CpglQN56.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/declaration-A7gmjyLW.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/base-modal-4qDvv1w0.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/upload-image-input-BeYDlzIZ.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/utils-CENGZRsf.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/chunk-GH5E4FQB-r6t4A6Q2.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/chunk-YBBOLEEC-CKOrHCRy.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/chunk-IEGJY7W3-LH0s_6_0.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/arrow-send-XjCxlbtm.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50232 - "GET /assets/constants-Bqlhkz7O.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/objectWithoutPropertiesLoose-BjXSgPXB.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51312 - "GET /assets/iconBase-qaKKhmS-.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:51318 - "GET /assets/index-DHvUem4P.js HTTP/1.1" 304 Not Modified
�[92m13:25:45 - openhands:INFO�[0m: docker_runtime.py:163 - Container started: kevin-runtime-persisted-oh-_workspaces_OpenHands_workspace_7e7a73cd6482478c8f4d5b741bd67e55. VSCode URL: None
�[92m13:25:45 - openhands:INFO�[0m: docker_runtime.py:182 - Waiting for client to become ready at http://localhost:33264...
�[92m13:25:45 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
INFO:     127.0.0.1:51318 - "GET /api/options/config HTTP/1.1" 200 OK
INFO:     127.0.0.1:51312 - "GET /api/settings HTTP/1.1" 404 Not Found
�[92m13:25:47 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:25:49 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:25:51 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:25:53 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:25:55 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:25:57 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:25:59 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:01 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:03 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:05 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:07 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:09 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:11 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:13 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:15 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:18 - openhands:INFO�[0m: action_execution_client.py:99 - Checking if runtime is alive (with timeout = 600)
�[92m13:26:18 - openhands:INFO�[0m: docker_runtime.py:188 - Runtime is ready.
�[92m13:26:18 - openhands:INFO�[0m: docker_runtime.py:206 - Copied selenium files to runtime
�[92m13:26:18 - openhands:INFO�[0m: base.py:258 - Found 0 local microagents.
�[92m13:26:18 - openhands:INFO�[0m: agent_controller.py:423 - Setting agent(CodeActAgent) state from AgentState.LOADING to AgentState.INIT
13:26:18 - openhands:INFO: agent_controller.py:332
OBSERVATION
AgentStateChangedObservation(content='', agent_state=<AgentState.INIT: 'init'>, observation='agent_state_changed')
�[92m13:26:20 - openhands:INFO�[0m: agent_controller.py:423 - Setting agent(CodeActAgent) state from AgentState.INIT to AgentState.STOPPED
13:26:20 - openhands:INFO: agent_controller.py:332
OBSERVATION
AgentStateChangedObservation(content='', agent_state=<AgentState.STOPPED: 'stopped'>, observation='agent_state_changed')
�[92m13:26:20 - openhands:INFO�[0m: manager.py:490 - closed_session:7e7a73cd6482478c8f4d5b741bd67e55

@SmartManoj
Copy link
Owner

After this, a new conversation works?

@SmartManoj
Copy link
Owner

Mounting the sock here and installing the docker package here solved D-in-D.

@kripper
Copy link

kripper commented Jan 8, 2025

Mounting the sock here and installing the docker package here solved D-in-D.

Links not working.

@SmartManoj
Copy link
Owner

Upstream is not using Selenium. I am manually installing it for quick workaround here. It shouldn't be in the pyproject.toml else the lock file will be invalidated. So, added in requirements-extra.txt. Need to refactor that.

@SmartManoj SmartManoj reopened this Jan 8, 2025
@SmartManoj
Copy link
Owner

Mounting the sock here and installing the docker package here solved D-in-D.

Links not working.

Due to local commit. Now works.

@kripper
Copy link

kripper commented Jan 8, 2025

Upstream is not using Selenium.

Are you releasing PRs to upstream?

@SmartManoj
Copy link
Owner

SmartManoj commented Jan 8, 2025

Upstream is not using Selenium.

Are you releasing PRs to upstream?

Not planned yet as it is using playwright and shouldn't playwright impl be improved?

@kripper
Copy link

kripper commented Jan 8, 2025

Not planned yet as it is using playwright and shouldn't playwright impl be improved?

I'm not sure, but upstream was working fine the other day for web browsing tasks.
Today I tried Kevin branch (using Gemini models), but they were refusing to browse the web.
It only worked when it executed a curl command.

I mean if you are releasing PRs in general (other features, not selenium), so that upstream developers don't reinvent the wheel and help to maintain/enhance your implementations.

I saw they were working on the front end for listing conversations.

@SmartManoj
Copy link
Owner

SmartManoj commented Jan 8, 2025

I mean if you are releasing PRs in general

Waiting for All-Hands-AI#2782 to be reopened.

@kripper
Copy link

kripper commented Jan 8, 2025

Waiting for All-Hands-AI#2782 to be reopened.

Maybe better isolate the "Auto Mode" related commits and create a PR with all other more important commits to concentrate the development on a single code base.

It's common to have some personal commits on a separate personal branch until upstream feels the need to merge or solves the issue in a different or more general way.

IMO, the support of mulitple conversations and the ability to resume them is gold and they need it urgently upstream.

@SmartManoj
Copy link
Owner

20 PRs were cleaned up.

@SmartManoj
Copy link
Owner

SmartManoj commented Jan 8, 2025

IMO, the support of mulitple conversations and the ability to resume them is gold and they need it urgently upstream.

Feel free to create a PR using these changes.

@kripper
Copy link

kripper commented Jan 8, 2025

I would like to, but there are so many changes and I'm still not enough familiarized with everything. I would probably miss some dependency.

I would suggest you to 1) create a PR for resuming multiple conversations before they diverge, and after that, 2) take to look at the upstream roadmap and the wanted PRs section in Slack to see what else may fit.

I can help you with the PRs revision.

Considering the high number of collaborators, I'm pretty sure the upstream managers are overwhelmed and focusing on the project roadmap.

@kripper
Copy link

kripper commented Jan 8, 2025

Is this doing the same?
All-Hands-AI@cde8aad

Upstream already implanted a conversations panel and the option to destroy conversations.

@SmartManoj
Copy link
Owner

SmartManoj commented Jan 8, 2025

Yes. With this change and All-Hands-AI#6080 when use_host_network sandbox config is set, persist_sandbox_for_each_conversation is not necessary?

@SmartManoj
Copy link
Owner

Need to refactor that.

Refactored.

@kripper
Copy link

kripper commented Jan 8, 2025

My friend,: let's better slowly get back to upstream. Otherwise we will be writing and testing code that will be overwritten by thousand of contributors on the upstream repo.

The good thing is that you have been merging from upstream.
What is missing is to release PRs aligned with the upstream roadmap, so that upstream efforts focus on those PRs instead of coming up with alternative redundant implementations.

@kripper
Copy link

kripper commented Jan 8, 2025

FYI, upstream automode:
All-Hands-AI@ebb2d86

@kripper
Copy link

kripper commented Jan 8, 2025

let's better slowly get back to upstream

@SmartManoj

To release a PR with the persistent_sessions changes to upstream, we should:

  1. Create a new branch based on upstream/main:
    git checkout -b pr_persistent_sessions upstream/main
  2. Cherry pick all related commits or use winmerge to merge required changes.
  3. Adapt the changes to upstream (some work has been done there).
  4. Create a PR and make some noise to get it merged ASAP.

Other features/PRs should be handled in similar way in separate branches with separate PRs.
It's important to not include other changes, otherwise they will reject them because they are trying hard to keep things clean.

If you want I can help you with that.
I would need a list of all the commits required for persistent_sessions and dependencies.

Otherwise I feel we are spending a lot of time writing and testing code that will be overwritten soon, plus your effort in merging redundant code every day.

What do you think?

@kripper
Copy link

kripper commented Jan 8, 2025

I tested upstream and it's almost able to resume sessions after a reboot.
There are some issues: All-Hands-AI#6148
But I think they will solve it here: All-Hands-AI#6114

The number of new PRs every day is crazy.
I hope they add more reviewers to merge all these PRs, because many of us are fixing the same issues.

@SmartManoj
Copy link
Owner

FYI, upstream automode: All-Hands-AI@ebb2d86

It's only for CLI.

@kripper
Copy link

kripper commented Jan 9, 2025

I tested upstream and it's almost able to resume sessions after a reboot.

It's working now. I was struggling with All-Hands-AI#6148.

@kripper
Copy link

kripper commented Jan 10, 2025

I miss the "beep" (when OH completes a task) in upstream.

@SmartManoj
Copy link
Owner

All-Hands-AI#2203

@kripper
Copy link

kripper commented Jan 10, 2025

All-Hands-AI#2203

It's disabled?

[EDIT] Ah, All-Hands-AI@80ba1fd

@kripper
Copy link

kripper commented Jan 10, 2025

To enable the conversations panel, they used localStorage:
localStorage.setItem("FEATURE_MULTI_CONVERSATION_UI", "true");

Another easter egg :-)

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

No branches or pull requests

2 participants