agent: Do not respond to query with non-zero exit code