[Bug] Bad interaction with GPG `pinentry`.

Resolved 💬 2 comments Opened Apr 17, 2025 by emcd Closed Aug 7, 2025

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.)

View original on GitHub ↗

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