[Bug]: ctrl-c results in strange terminal outputs
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
Describe the bug and reproduction steps
I had a session where I asked openhands to perform a series of actions regarding running an npm server.
It ran into trouble after as sequence where:
- it ran a command that continued running (
vite) - I asked it a question ("is the app still running")
- It tried to find out (
ps aux | grep vite) - But it ended up getting this message
{
"exit_code": -1,
"hostname": null,
"pid": -1,
"prefix": "[Below is the output of the previous command.]\n",
"py_interpreter_path": null,
"suffix": "\n[Your command \"ps aux | grep vite\" is NOT executed. The previous command is still running - You CANNOT send new commands until the previous command is completed. By setting `is_input` to `true`, you can interact with the current process: You may wait longer to see additional output of the previous command by sending empty command '', send other commands to interact with the current process, or send keys (\"C-c\", \"C-z\", \"C-d\") to interrupt/kill the previous command before sending your new command.]",
"username": null,
"working_dir": null
}
- It ran
npm run dev > vite.log 2>&1 & - It ran
ps aux | grep vite && echo "=== Log file contents ===" && cat vite.log - At this point it got just "p" as the output and
{
"exit_code": -1,
"hostname": null,
"pid": -1,
"prefix": "",
"py_interpreter_path": null,
"suffix": "\n[The command has no new output after 30 seconds. You may wait longer to see additional output by sending empty command '', send other commands to interact with the current process, or send keys to interrupt/kill the command.]",
"username": null,
"working_dir": null
}
as the metadata.
This is unexpected, as I would have expected that the command that was run in the background would be in the background, and then the other commands would have executed quickly and returned a response.
The full trajectory can be found here: https://www.all-hands.dev/share?share_id=ca57575f8cd2c41652aaeca4e9613082e2591b0833e6a7f796f43f836932eb12
OpenHands Installation
app.all-hands.dev
OpenHands Version
0.22.0
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response
Again having trouble after "ctrl-c" is pressed. I wasn't able to press the "stop" button on the interface and the agent froze up.
Yeah this is a major issue. Going to bump up severity because it essentially locks the session and you can no longer run commands.
Is this still an issue now?
We still have C-c problems, but maybe this is not one of them. Let's close.