OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: CodeAct freezes when editing existing files

Open rbren opened this issue 1 year ago • 2 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 I give CodeAct a challenge to edit an existing repo, it hangs and eventually times out when it comes time to make the edit

Current Version

0.5

Installation and Configuration

docker run     \
-e SANDBOX_USER_ID=$(id -u)     \
-e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE     \
-v $WORKSPACE_BASE:/opt/workspace_base     \
-v /var/run/docker.sock:/var/run/docker.sock     \
-p 2000:3000     \
--add-host host.docker.internal:host-gateway  \
ghcr.io/opendevin/opendevin:0.5


### Model and Agent

CodeAct, gpt-4-turbo

### Reproduction Steps

1. Point OD to the OD codebase
2. in `opendevin/core/config.py`, change `-n` to `-x`
3. Ask OD to fix the tests

It successfully diagnoses the problem and tries to make an edit, but then hangs, like so:

============== STEP 15

16:33:47 - ACTION CmdRunAction THOUGHT:We've located the section where the -x option for maximum characters is defined. Let's change it to -n to match the expected output in the test case. COMMAND: edit 145:145 '-n', end_of_edit 16:35:47 - opendevin:ERROR: ssh_box.py:224 - Command timed out, killing process... 16:35:47 - OBSERVATION CmdOutputObservation(content='Command: "edit 145:145\n '-n',\nend_of_edit" timed out. Sending SIGINT to the process: ^C', command_id=-1, command="edit 145:145\n '-n',\nend_of_edit", exit_code=-1, observation='run')


### Logs, Errors, Screenshots, and Additional Context

_No response_

rbren avatar May 09 '24 17:05 rbren

@xingyaoww any ideas here?

rbren avatar May 09 '24 17:05 rbren

Is it related to https://github.com/OpenDevin/OpenDevin/issues/1663? Should be temporarily fixed by https://github.com/OpenDevin/OpenDevin/pull/1612

xingyaoww avatar May 09 '24 20:05 xingyaoww

Oops yes closing in favor of #1663.

rbren avatar May 10 '24 02:05 rbren