For every keystroke, TUI tries to open an image file with a filename based on the character just typed
Resolved 💬 5 comments Opened Aug 31, 2025 by neurostream Closed Sep 3, 2025
What version of Codex is running?
codex-cli 0.26.0 and codex-cli 0.27.0
Which model were you using?
gpt-oss
What platform is your computer?
amd64 ubuntu linux
What steps can reproduce the bug?
after upgrade from 0.25.0 to 0.26.0 and 0.27.0, every keystroke input in the TUI writes the the message:
INFO ERR: No such file or directory (os error 2)
to the codex tui log
What is the expected behavior?
typing out a promopt string at the tui shouldn't produce a file not found error for each character
What do you see instead?
accept keyboard input without throwing an error
Additional information
_No response_
5 Comments
This keylogging error happens in 0.26.0 and 0.27.0 ( latest release version at filing this bug) regardless of whether CODEX_TUI_RECORD_SESSION is set 0 or 1. The file-not-found error is written to $CODEX_HOME/log/codex-tui.log for each character typed at the TUI prompt.
dug deeper into the per‑keystroke logging and here's what I found (environment + reproducible evidence... TLDR, it's trying to read a file in the workdir called "a", if i press the "a" key)
Environment / context:
codex-cli versions affected: 0.26.0 and 0.27.0 (0.25.0 clean)
Platform: amd64 Ubuntu Linux
Airgapped environment (so outbound update/network calls are blocked)
CODEX_HOME is a per‑project directory (example: /home/codex/awsreview)
version.json DOES exist before starting the TUI (so it’s not repeated cache misses)
Session recording explicitly disabled: CODEX_TUI_RECORD_SESSION=0
Logs in $CODEX_HOME/log/codex-tui.log show: INFO ERR: No such file or directory (os error 2) once per typed character
if i strace the running codex tui PID, when I type the letter "a" as the very first character in the TUI input: _openat(AT_FDCWD, "a", O_RDONLY|O_CLOEXEC) = -1_ with a "ENOENT" on file descriptor 14 followed by several transient /dev/tty opens in the strace. Its trying to read a file name after each letter that is typed at the prompt. The tui log shows the "os error 2")
If I then create an actual file named "b" (touch b) and type "b" in the TUI, strace shows _ openat(AT_FDCWD, "b", O_RDONLY|O_CLOEXEC) = 14_ (success, no ENOENT) Immediately after, the log switches from ENOENT to: "INFO ERR: The image format could not be determined" (for funsies, I tried replacing b with a real PNG file and typed the letter "b" on the keyboard again to see if it would do something else, but same error)
@aibrahim-oai / @bolinfest : is there a way we can disable (env var, ideally?) the behavior introduced by https://github.com/openai/codex/pull/2683 for terminals/use-cases that it doesn't work for?
Or is something else triggering a filesystem read for an image file for each TUI input keystroke ?
Since 0.26.0, codex tui looks for a file based on the keyboard character typed, so if i type "Hi", it will search the workdir for an image file called "H" and an image file called "i" and tui-log shows the i/o errors for each keystroke.
@neurostream I was seeing this in 0.27 and now it seems to be fixed in 0.28
@frasergr thank you for the heads up. i just watched another strace on 0.28.0 and, indeed, it is no longer trying to open an image file for every keystroke. thanks for the heads up!
#2922 seems to have fixed this ( will close this issue )