Codex gets stuck while performing pnpm test, since after running the tests vitest requires the user to press q to exit the testing dialog
Resolved 💬 4 comments Opened Sep 17, 2025 by adspiceprospice Closed Jan 17, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.4.10
Which model were you using?
gpt-5-codex-medium
What platform is your computer?
macos 26
What steps can reproduce the bug?
When the agent is working on a project with vitest testing suite and has to run the test suite to validate its work, it will get stuck after running the test, not moving on to the next step
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
4 Comments
run
vitest runand not in watch modeAlways mention in your
AGENTS.mdthat it should usetimeout <seconds> <cmd>for running commands, otherwise it ill get stuck; especially true on test suites.nodeis notorious for it's quirky exit behaviour and there's a lot of people that don't know any better leaving open handles - that's bound to happen.On macOS you have to install it by
brew install coreutils.You can set time limit like this for 20 seconds
"test:unit": "(vitest && exit 0) & pid=$!; sleep 20 && kill $pid 2>/dev/null & wait $pid"Or as a better option:
"test:unit": "vitest run"in this case tests will be closed right after executing
Closing out old bugs.