It's always pinentry !
Spent 1h+ to fight an issue...
Don't run gpg or an application calling gpg if you invoked your shell session with 'doas|sudo su' .
Sure, you could use "gpg --pinentry-mode loopack" dirty secret if you invoke gpg directly but from another application, you are fucked.
That was unreasonable to spent that amount of time... :/
I'm pretty sure pinentry could break Claude.