[Bug] Bad interaction with GPG `pinentry`.
Codex executed git commit. I have a configuration to sign commits with a passphrase-protected GPG key. Under WSL, there is no native GUI or keychain support for GPG and so it is uses pinentry on the console for passphrase entry. The pinentry program performs raw I/O on the TTY device (for security purposes) and that interferes with Codex as can be seen below:
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│( ● ) Thinking.. <OK> <Cancel> │
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│( ● ) Thinking.. │
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│( ●) Thinking.. │
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│( ● ) Thinking.. │
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│( ● ) Thinking.. │
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│( ● ) Thinking.. │
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│( ● ) Thinking.. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
send q or ctrl+c to exit | send "/clear" to reset | send "/help" for commands | press enter to send
As I mentioned in the nearly identical bug report filed for Claude Code, Codex may need to save console screen state and relinquish the console screen before running shell commands. Fwiw, Aider does not have this problem.
(I'm not much of a Typescript developer, so I probably won't make a patch unless I can get a LLM to read through the sources with me and pinpoint the issue. Thanks for making the Codex sources open, btw. Maybe this will encourage Anthropic to open the sources for Claude Code so that users can help fix the pile of bugs over there.)
2 Comments
Can confirm. I can reproduce this on my end as well.
Thank you for the feedback! Please try again on the latest version of Codex CLI. If the issue persists, we would appreciate any contributions to the
codex-rs/implementation. More details on our project update can be found here.