On Windows, the return value of `cmake` config/build cannot be captured until it times out
Open 💬 7 comments Opened Mar 12, 2026 by ysysimon
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
newest
What subscription do you have?
plus
What platform is your computer?
Microsoft Windows NT 10.0.19044.0 x64
What issue are you seeing?
On Windows, the return value of cmake config/build cannot be captured until it times out. Is this a problem with CMake or with Codex shell?
What steps can reproduce the bug?
When compiling a C++ project using MSVC + Ninja + CMake on Windows, Codex will run compile or configure commands in the shell until a timeout occurs.
What is the expected behavior?
I suspect it might be because CMake uses a sub-thread for compilation, causing shell commands to not return values?
Additional information
_No response_
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I have solved the problem; first, unified_exec must be enabled on Windows.
Then, for the MSVC toolchain, add the following content to AGENTS.md
At this point, the codex shell can capture the output of the cmake compilation and config commands and return immediately.
#14398 Finding this PR may cause the above methods to fail, if this PR merged
unified_execwill be unavailable until the Windows sandbox supports it.The problem still remains. Started from v0.115.0
This is really frustrating. I want to know if the developers plan to fix this issue.
The commands take an extremely long time to hang indefinitely in Codex CLI and the Codex extension, while they run instantly and normally in PowerShell.
The problematic commands are:
build_msvc_cmake.cmd
Try the solution I mentioned for walk-around
Sadly, it doesn't work.