If gpg-agent cannot be started (e.g. due to an error in gpg-agent.conf, but also
if gpg-agent cannot be found), then the parseable output by gpg is like this:
gpg2 --status-fd 2 --clearsign -u 0xDD5F693B
gpg: can't connect to the agent: IPC connect call failed
gpg: skipped "0xDD5F693B": No secret key
[GNUPG:] INV_SGNR 9 0xDD5F693B
[GNUPG:] FAILURE sign 17
gpg: [stdin]: clearsign failed: No secret key
"FAILURE sign 17" is "GPG_ERR_NO_SECKEY", which is not quite correct. I would
have expected something like GPG_ERR_NO_AGENT, GPG_ERR_AGENT or
GPG_ERR_ASSUAN_SERVER_FAULT.