[Bug]: Refresh Files takes over 10s when Agent is running a Task
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.
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
- Give the agent a simple task (e.g. Write tic tac toe game into app1.py, Python flask, web GUI.)
- Click refresh files
- 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
Best guess is this is an await stealing the event loop
awaitstealing the event loop
Could that also be the cause of how /messages sometimes has to wait until after agent initialisation before responding?
waiting for the agent's action to be done πΆβπ«οΈ
Yup I bet that's the case!
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.
This issue was closed because it has been stalled for over 30 days with no activity.