WSL2: codex CLI prints raw JSON messages instead of formatted output
Resolved 💬 3 comments Opened Sep 18, 2025 by sutaminajing40 Closed Nov 2, 2025
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_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗