WSL2: codex CLI prints raw JSON messages instead of formatted output

Resolved 💬 3 comments Opened Sep 18, 2025 by sutaminajing40 Closed Nov 2, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.38.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

Environment

  • OS: Windows 11 + WSL2 (Ubuntu 22.04)
  • WSL version: 2.6.1.0
  • codex-cli version: 0.38.0
  • Node.js version: 24.8.0
  • Python version: 3.13.7

Steps to Reproduce

  1. Install codex-cli in a WSL2 environment
  2. Run a simple command, for example:

codex "print('hello world')"

  1. Observe the terminal output

Expected Behavior

The CLI should display only the generated code or text response, nicely formatted for the terminal.

Actual Behavior

Instead of formatted output, the terminal prints raw JSON messages such as:

{"type":"agent-turn-complete","turn-id":"10","input-messages":[...]}

This makes the CLI output unreadable.

Additional Context

  • The issue seems specific to WSL2; it may be related to how stdout/stderr is handled.
  • Screenshot attached for clarity.

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

3 Comments

sutaminajing40 · 11 months ago

This comment appears to be spam/malware.

  • It contains a suspicious ZIP file attachment (f70f6f6e8412.zip) with no explanation or source code reference.
  • The message is vague ("This might work for you.") and does not provide any technical details or context.
  • This is not the standard way maintainers share fixes (normally via PRs or code snippets).

For the safety of the community, please review and remove this comment.

novacoole · 11 months ago

To add to the above;

  • 2 week old github account.
etraut-openai contributor · 9 months ago

I suspect this bug report is no longer relevant, so I'm going to close. If you're still seeing this issue, please let us know and I'll reopen.