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
- Install codex-cli in a WSL2 environment
- Run a simple command, for example:
codex "print('hello world')"
- 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_
3 Comments
This comment appears to be spam/malware.
f70f6f6e8412.zip) with no explanation or source code reference.For the safety of the community, please review and remove this comment.
To add to the above;
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.