Dotnet build execution takes indefinite amount of time without success
Open 💬 13 comments Opened Oct 30, 2025 by AndrewNikolin
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.50.0
What subscription do you have?
Plus
Which model were you using?
gpt-5-codex
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
Asked the agent to run dotnet build and fix errors from the output (it made some while implementing changes in previous session). The build of the solution takes around 4 seconds when ran from IDE, while in CLI it was reportedly running for a minute and didn't yield any results. The previous session i waited around 10 minutes with same conclusion
What steps can reproduce the bug?
Uploaded thread: 019a32fc-5bc6-7d50-a33b-0dd10e2a7031
What is the expected behavior?
dotnet build command is executed ok
Additional information
Observed in some previous sessions that it also didn't succeed in build and responded with guidance for me to run it
13 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
For comparison ran same prompt in copilot cli which successfully built the solution and retrieved the output of build command
Seeing the same thing with a dotnet project.
Codex version 0.55
OpenAI Codex (v0.55.0)Model
gpt-5-codexMacBookPro - Apple M3 Max
Mac OS Sequoia
Version 15.7.1 (24G231)After no progress, I stopped codex, manually ran a restore, then instructed codex to try a build with the no-restore flag. No additional progress.
@MattCosturos, you're running a relatively old version of the CLI. Please update to the latest (0.61.0 or newer).
@etraut-openai it still occurs on the latest OpenAI Codex (v0.63.0)
Same problem, keeps wasting tokens
Just confirming that this is still an issue on 0.64.0 with following observed
Uploaded a thread jic
019ae1ec-8086-73b3-8c60-f5ddcf38d2e6I've had success on 0.64.0, the gotcha was that it requires /approvals Agent (full access)
@mattxo that was always the case, or alternatively as shared here https://github.com/openai/codex/issues/3269#issuecomment-3472055175 setting up custom instructions. But that's more of a "workaround" and changing approvals back and forth also isn't ideal
Today's 0.66.0 update that has the following feature https://github.com/openai/codex/pull/7033 makes life easier: after Codex remembers the "allow always" for dotnet commands the issues described in this ticket don't happen anymore
I'm having luck telling the agent to use
-m:1flag. After some testing, telling the agent to rundotnet buildanddotnet build -m:1I'm consistently seeing:-m:1flag always runs and builds successfully and the agent can see its output as expectedIn my case the reason was that the default sandbox mode doesn't allow network access, which
dotnet buildrequires (for restore, I suppose). So I added the following to~/.codex/config.toml:Oh yes good catch, the reason is the restore. You can also tell Codex to use the
--no-restoreflag. For reference this is my Agents.MD file instructions which works without enabling network access in the sandbox.