Failed to read prompt from stdin: stream did not contain valid UTF-8

Resolved 💬 1 comment Opened Jan 5, 2026 by ftufkc Closed Jan 15, 2026

What version of Codex is running?

v0.77.0

What subscription do you have?

plus

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Linux 5.10.0

What issue are you seeing?

When I use codex to execute codex exec -s danger-full-access --json - < "${WORKSPACE}/prompt.txt" > "${WORKSPACE}/result_temp.log". It reported an error Failed to read prompt from stdin: stream did not contain valid UTF-8.Is this because of the codex's own limitations that I can only input UTF-8 text? If so, what can I do to bypass it? For example, should I first convert prompt.txt to UTF-8 format?

What steps can reproduce the bug?

execute codex exec -s danger-full-access --json - < "${WORKSPACE}/prompt.txt" > "${WORKSPACE}/result_temp.log". When prompt.txt is not a text that is entirely composed of utf8.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗