Running into an interesting scenario where my open...
# questions
s
Running into an interesting scenario where my openhands is trying to run npm commands: Like
cd apps/api && npm test --silent
And then just freezes up I tried debugging by accessing the docker container and running the command manually and it looks like the issue may be that openhands doesn't know how to press
Y
when confirmation prompts appear
Copy code
Need to install the following packages:
jest@30.1.3
Ok to proceed? (y)
Anyone know how I can work around this?
p
Copy code
󰕈 paul  /tmp/test-npm   v23.11.0   18:53 
 npm run test

> test-npm@1.0.0 test
> npx jest

Need to install the following packages:
jest@29.7.0
Ok to proceed? (y)
npm error canceled
npm error A complete log of this run can be found in: /home/paul/.npm/_logs/2025-09-02T22_53_52_693Z-debug-0.log
Copy code
󰕈 paul  /tmp/test-npm   v23.11.0   18:53 
 echo "yes" | npm run test

> test-npm@1.0.0 test
> npx jest

npm warn exec The following package was not found and will be installed: jest@29.7.0
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /tmp/test-npm
  2 files checked.
  testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 0 matches
  testPathIgnorePatterns: /node_modules/ - 2 matches
  testRegex:  - 0 matches
Pattern:  - 0 matches
Copy code
 cat package.json
{
  "name": "test-npm",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "npx jest"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "type": "commonjs"
}
l
Hmm, OpenHands should be able to just do this. Are you using the most recent version?
s
Currently on 0.54, but I could try again with 0.55
For more context I'm trying to benchmark openhands on public repos and measuring success by seeing if the features passes some unit tests. This is done by scraping PR's that implement a feauture/test pairs and letting openhands re-write the features. I have around 500 feature/test pairs, and it'd be nice if I didn't have to go in and cover every case where openhands could potentially run into an interactive command
I think 0.55 might have actually fixed the issue! Hm is that also your expectation @limited-student-10747?
l
No, it should’ve been fixed long before 0.54 (somewhere around 0.30)
Basically OpenHands will timeout when no output has been received for 10 seconds, so it should wait 10 seconds, see that npm is requesting confirmation, then enter “y”
s
Hm alright some more debugging on my end then. Thanks for the input!
👍 1