GPG signing prompt conflicts with Claude Code TUI during git commit
Resolved 💬 4 comments Opened Feb 2, 2026 by yuu61 Closed Mar 3, 2026
Description
When Claude Code executes git commit and GPG signing is enabled, the GPG passphrase prompt (e.g., pinentry-curses or pinentry-tty) conflicts with Claude Code's terminal UI rendering. The two programs compete for screen control, making it nearly impossible to interact with the GPG prompt normally.
Additionally, when GPG signing fails (due to the unusable prompt), Claude Code retries the commit with --no-sign, bypassing the user's GPG signing configuration without explicit consent.
Steps to Reproduce
- Enable GPG commit signing (
git config commit.gpgsign true) - Use a pinentry program that requires terminal interaction (e.g.,
pinentry-curses,pinentry-tty) - Have Claude Code execute a
git commitcommand - The GPG passphrase prompt appears but conflicts with Claude Code's screen updates
- If signing fails, Claude Code automatically retries with
--no-sign
Expected Behavior
- The GPG passphrase prompt should be usable without interference from Claude Code's TUI updates (e.g., pausing screen updates while an interactive subprocess is active)
- Claude Code should not silently bypass GPG signing on failure — it should report the error and let the user decide how to proceed
Actual Behavior
- The GPG prompt and Claude Code's TUI compete for screen real estate and cursor position
- It is technically possible to type the passphrase by guessing cursor position, but the experience is very poor
- Screen rendering becomes garbled/corrupted
- On signing failure, Claude Code retries with
--no-sign, creating unsigned commits despite the user's configuration requiring signatures
Workarounds
- Use
pinentry-gnome3,pinentry-mac, or another GUI-based pinentry that doesn't use the terminal - Use a GPG agent with cached passphrase to avoid the prompt
- Switch to SSH signing (see #118 for details)
- Disable GPG signing temporarily
Environment
- Claude Code: 2.1.29
- Node.js: v24.11.1
- OS: Ubuntu 24.04.3 LTS (WSL2)
- Kernel: 6.6.87.2-microsoft-standard-WSL2
- Shell: bash
- Terminal: xterm-256color
- Git: 2.43.0 (
commit.gpgsign = true) - GnuPG: 2.4.4 (libgcrypt 1.10.3)
- Pinentry: pinentry-curses (
/usr/bin/pinentry→/usr/bin/pinentry-curses) - gpg-agent.conf: default (no custom configuration)
Related Issues
- #118 — Same underlying problem (auto-closed and locked)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗