created ~/.gnupg/gpg-agent.conf containing:
debug ipc,cache debug-pinentry log-file socket://
I may be reading your comment wrong, but the problem here is not multiple pinentry prompts, or multiple gpg-agents present.