AGENTS.md is silently ignored when invalid utf8 characters are present

Resolved 💬 3 comments Opened May 18, 2026 by runfence Closed May 20, 2026

What version of Codex CLI is running?

0.130.0

What subscription do you have?

Pro

What platform is your computer?

Windows

What terminal emulator and version are you using (if applicable)?

Windows Terminal (PowerShell)

Codex doctor report

error: unexpected argument '--json' found

What issue are you seeing?

c:\Users\USERNAME\.codex\AGENTS.md is not injected into context after I accidentally put invalid utf8 characters into the text there.

What steps can reproduce the bug?

Edit the file with wrong encoding, add some quotes that read as ? when opened back in utf8.

Uploaded thread: 019e38be-0085-7450-9591-5828b2035e64

What is the expected behavior?

c:\Users\USERNAME\.codex\AGENTS.md is injected into context, merged with project level AGENTS.md if exists. If invalid characters prevent this from working, a clear error message should show it.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗