OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: Refresh Files takes over 10s when Agent is running a Task

Open tlpythonuse-colab opened this issue 1 year ago β€’ 4 comments

Is there an existing issue for the same bug?

  • [x] I have checked the troubleshooting document at https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting
  • [X] I have checked the existing issues.

Describe the bug

When agent task is running, files cannot be refreshed. The /refresh-files fetch request is only fulfilled many seconds later.

image

Current Version

3d53d363b4416b05046dd390ca37d5745defce5a

Installation and Configuration

make build
make setup-config
export DOCKER_HOST=unix:///run/user/1000/docker.sock
make run

Model and Agent

  • Model: gpt-4-turbo-preview
  • Agent: CodeActAgent

Reproduction Steps

  1. Give the agent a simple task (e.g. Write tic tac toe game into app1.py, Python flask, web GUI.)
  2. Click refresh files
  3. Files are not refreshed until many seconds later; in DevTools network tab, the request is pending until many seconds later.

Logs, Errors, Screenshots, and Additional Context

... 17:04:25 - opendevin:INFO: agent_controller.py:189 - Setting agent(CodeActAgent) state from AgentState.RUNNING to AgentState.AWAITING_USER_INPUT INFO: 127.0.0.1:57928 - "GET /api/refresh-files HTTP/1.1" 200 OK INFO: 127.0.0.1:57936 - "GET /api/refresh-files HTTP/1.1" 200 OK INFO: 127.0.0.1:57940 - "GET /api/refresh-files HTTP/1.1" 200 OK INFO: 127.0.0.1:57956 - "GET /api/refresh-files HTTP/1.1" 200 OK INFO: 127.0.0.1:57972 - "GET /api/refresh-files HTTP/1.1" 200 OK INFO: 127.0.0.1:39650 - "GET /api/refresh-files HTTP/1.1" 200 OK

tlpythonuse-colab avatar May 14 '24 09:05 tlpythonuse-colab

Best guess is this is an await stealing the event loop

rbren avatar May 14 '24 15:05 rbren

await stealing the event loop

Could that also be the cause of how /messages sometimes has to wait until after agent initialisation before responding?

tlpythonuse-colab avatar May 15 '24 19:05 tlpythonuse-colab

waiting for the agent's action to be done πŸ˜Άβ€πŸŒ«οΈ

iFurySt avatar May 16 '24 01:05 iFurySt

Yup I bet that's the case!

rbren avatar May 16 '24 13:05 rbren

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 16 '24 01:06 github-actions[bot]

This issue was closed because it has been stalled for over 30 days with no activity.

github-actions[bot] avatar Jun 24 '24 01:06 github-actions[bot]