[Bug]: Clicking on a file to display is blocked when the agent is working
Is there an existing issue for the same bug?
- [X] I have checked the troubleshooting document at https://docs.all-hands.dev/modules/usage/troubleshooting
- [X] I have checked the existing issues.
Describe the bug
When the agent is running a task, the user is unable to open any of the files in the workspace.
Current OpenHands version
0.9.1
Installation and Configuration
make build && make run
Model and Agent
N/A
Operating System
macOS Sonoma
Reproduction Steps
- Create a file (or two) in the workspace with some content
- Ask OpenHands something to perform a task
- While OpenHands is working, attempt to open the file
Logs, Errors, Screenshots, and Additional Context
No response
Yep. I've seen this as well. At first I thought it's by design because what would happen if you edited a file while OpenHands was working on it? But I think it's because OpenHands does everything synchronously.
@mamoodi Good point. It would make sense to the user if they are unable to edit a file while OpenHands is working, but it may be confusing if they are unable to open it. I think it is natural for the user to try and open a file, especially when OpenHands is working, to "see what is going on" (even if we don't stream changes at the moment)
I think we can fix this by tweaking this: https://github.com/All-Hands-AI/OpenHands/blob/d1a741792fe3b7c607e0acd0d47eb8e8a735a51b/openhands/runtime/client/client.py#L492-L498
We can allow endpoint like /list_file etc to not hold this lock at all -- the lock was mainly there to make sure we are not executing multiple bash commands at the same time
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 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.