Skip to content

Windows: failing msbuild /m /v:minimal can return blank output in Codex while local PowerShell shows compiler errors #14035

@Cleroth

Description

@Cleroth

Summary

On Windows, Codex can capture no useful output from a failing multi-node MSBuild invocation even though the same command on the same machine in local PowerShell shows the real CL.exe compiler diagnostics.

This looks like a Codex Windows process-output capture issue around multi-node MSBuild, not an MSBuild problem itself.

Environment

  • OS: Windows
  • Shell: PowerShell
  • Build tool: msbuild.exe
  • Project type: native C++ solution
  • Command:
    msbuild.exe "project.sln" /p:Configuration=Debug_LivePP /p:Platform=x64 /m /nologo /v:minimal

Deterministic repro

Have codex run a build with msbuild.exe that produces a compile error, under sandbox.

msbuild.exe "project.sln" /p:Configuration=Debug_LivePP /p:Platform=x64 /m /nologo /v:minimal

Expected

Codex should capture the same compiler diagnostics that local PowerShell shows for the same failing build.

Actual

Codex returns exit code 1 with blank output for the failing build.

In the same repo, on the same machine, running the same command directly in local PowerShell shows the real compiler error text.

Narrowed-down behavior

This is not just “MSBuild failed” and it is not just “verbosity too low”.

What I observed:

  • msbuild ... /m /v:minimal in Codex: blank output on real compile failure
  • msbuild ... /m:2 /v:minimal in Codex: same problem
  • msbuild ... /m:1 /v:minimal in Codex: real compiler diagnostics are visible
  • msbuild ... /v:minimal with no /m in Codex: real compiler diagnostics are visible
  • local PowerShell with /m /v:minimal: real compiler diagnostics are visible

So the repro appears to depend on the multi-node MSBuild path when Codex is capturing output.

Things I ruled out

These did not fix it:

  • multi_tool_use.parallel vs direct command execution
  • /consoleLoggerParameters:ForceNoAlign
  • -tl:off
  • MSBUILDTERMINALLOGGER=off

Also, with /m /v:normal, Codex still did not show the real compiler diagnostics; it only showed the top-level summary:

Build FAILED.
0 Warning(s)
0 Error(s)

Why this matters

This is easy to misdiagnose as:

  • “MSBuild produced no output”
  • /v:minimal suppressed the error”
  • or “the build failed for an unknown reason”

In practice the build error is real, but Codex loses the useful diagnostics specifically in this path.

Workaround

Diagnostic workaround in Codex:

msbuild.exe "project.sln" /p:Configuration=Debug_LivePP /p:Platform=x64 /m:1 /nologo /v:minimal

I do not want to use /m:1 as the default because it slows down normal builds. It is only useful as a follow-up rerun when the failing /m build comes back blank.

Request

Please investigate Windows output capture for failing multi-node MSBuild processes. The important symptom is:

  • local PowerShell shows the real compiler diagnostics
  • Codex captures blank output or only a top-level failure summary for the same failing /m build

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions