TUI steals keystrokes from GPG pinentry during commit

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 2, 2026

Problem

When Claude Code runs a command that triggers a GPG passphrase prompt (e.g., git commit with commit signing enabled), the TUI intermittently captures keystrokes that should reach the pinentry program. Some keystrokes land in pinentry correctly, others are swallowed by Claude Code's input handling. The effect is non-deterministic — sometimes the passphrase can be entered successfully, other times characters are lost, making the passphrase entry unreliable.

Steps to reproduce

  1. Configure git to sign commits with GPG (commit.gpgsign = true)
  2. Use a terminal-based pinentry (e.g., pinentry-curses or pinentry-tty)
  3. Ask Claude Code to create a commit
  4. When the GPG passphrase prompt appears, attempt to type the passphrase
  5. Some keystrokes are consumed by Claude Code rather than reaching pinentry

Expected behavior

When a subprocess spawned by Claude Code needs terminal input (GPG pinentry, sudo, ssh passphrase, etc.), all keystrokes should reliably reach that subprocess.

Environment

  • macOS (Darwin)
  • Claude Code CLI

View original on GitHub ↗