OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: OpenDevin freezes when an interactive CLI program is called

Open neubig 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://github.com/OpenDevin/OpenDevin/blob/main/docs/guides/Troubleshooting.md
  • [X] I have checked the existing issues.

Describe the bug

When OpenDevin executes a command that is interactive (requiring user input) it freezes and spins with high CPU usage.

For instance, some examples are nano and git push.

There are a few solutions:

  1. Throw an error when an interactive program is run
  2. Allow OpenDevin to interact with interactive programs

Current Version

commit 454e9613b0b4c7a9dbb2b8273aff0b36c4d8a2bb (HEAD -> main, origin/main, origin/HEAD)
Author: yaroslavMain <[email protected]>
Date:   Sun Apr 21 22:41:04 2024 +0300

Installation and Configuration

N/A

Model and Agent

No response

Reproduction Steps

  1. Get the agent to run an interactive command, such as saying "modify README.md with nano"

Logs, Errors, Screenshots, and Additional Context

No response

neubig avatar Apr 22 '24 02:04 neubig

I wonder if PR https://github.com/OpenDevin/OpenDevin/pull/1347 may improve the experience with this a little bit? Probably not a solution, but it tries adding to the prompt a specific prohibition to use some interactive programs: * don't run interactive text editors (e.g. 'nano' or 'vim'), instead use the 'write' or 'read' action.

I'm curious to see the effect since I run GPT-3.5 quite a lot and it keeps doing this.

enyst avatar Apr 26 '24 23:04 enyst

Certainly looks like it will make it better, although maybe not fix the problem

neubig avatar Apr 27 '24 00:04 neubig

I believe we have a timeout set, but it's something like 2m (to make sure there's enough time for sth like an npm install)

Not sure what a good solution would be here...

rbren avatar May 02 '24 02:05 rbren

An auxiliary problem (maybe it should be its own issue or maybe not?)

When such an interactive program is run, it doesn't show up in the interface, only in the logs. So it is hard to tell what went wrong from just the interface. Here is an example where a git-push command was run:

09:02:17 - opendevin:INFO: codeact_agent.py:279 - Cost: 0.04 USD | Accumulated Cost: 0.43 USD
09:02:17 - ACTION
**CmdRunAction**
THOUGHT:The changes have been successfully committed. Now, I will push the new branch `add-development-link` to the GitHub repository.
COMMAND:
git push origin add-development-link

The interface does not show this "git push".

Screenshot 2024-05-14 at 9 03 50 AM

neubig avatar May 14 '24 13:05 neubig

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 22 '24 01:06 github-actions[bot]

This is much much better after https://github.com/OpenDevin/OpenDevin/pull/2034 so I'm OK with closing this.

neubig avatar Jun 22 '24 02:06 neubig